Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daily release/8 19 24 noon #18423

Merged
merged 15 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ redirects:
freshnessValidatedDate: never
---

You can use the [Event API](/docs/data-apis/ingest-apis/introduction-event-api) to report custom alert incident events to New Relic.
You can use the [Event API](/docs/data-apis/ingest-apis/introduction-event-api) to report custom alert incident trigger events to New Relic.
This event does not directly create an incident, but it does trigger the creation of the incident.

The API is an asynchronous endpoint. This means you can send a large volume of POSTS, reliably, with low-response latency.

Expand Down Expand Up @@ -135,6 +136,10 @@ Here's an example of a NerdGraph query and its result.

The incident event API uses the Event API's value types. For descriptions of these value types and guidelines on using them, see [our event API JSON guidelines](/docs/data-apis/ingest-apis/introduction-event-api/#json-guidelines).

<Callout variant="caution">
If you create two trigger events with the exact same `aggregationTag`, they will be aggregated to the same incident. Meaning, only one incident is created from multiple triggers.
</Callout>

<table>
<thead>
<tr>
Expand Down Expand Up @@ -163,9 +168,9 @@ The incident event API uses the Event API's value types. For descriptions of the

Any attribute prefixed with `aggregationTag` will be used to aggregate trigger events together.

In other words, two trigger events with the same aggregation tags are aggregated to the same incident. (This assumes there's no resolve event between them).
In other words, two trigger events with the same aggregation tags are aggregated to the same incident. (Assuming none of the trigger events are resolve events).

When resolving incidents, its important that the resolve event include the same aggregation tags.
When resolving incidents, it's important that the resolve event include the same aggregation tags.

Aggregations tags with reserved keywords are filtered out. For example, in a JSON payload with `aggregationTag.priority: 2` this key-value pair will be omitted in the incident event with these reserved keywords:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
---
title: Forward your Lambda function logs with New Relic and OpenTelelemtry
metaDescription: How to instrument your serverless applications on AWS Lambda with ADOT solution in New Relic.
freshnessValidatedDate: never
---
You can monitor AWS serverless application that sends OpenTelemetry log events data from AWS CloudWatch to the New Relic UI.
You can configure the ADOT Lambda layer collector to successfully forward your OpenTelemetry application logs with all of your service and application context.
This includes ensuring that logs contain metadata such as service name, log group name, function ARN and any other relevant attributes that can aid in observability and troubleshooting.


## Prerequisites [#Prerequisite]

* Make sure you have a <InlinePopover type="licenseKey" />.
* An AWS account



## Procedure [#procedure]

The following setup shows one approach for configuring environment variables to your AWS Lambda application. You can also configure them on the AWS functions page. For more information, [see the Amazon Lambda environment variables doc](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html).

<Steps>

<Step>

Open the [AWS Serverless Application Repository](https://serverlessrepo.aws.amazon.com/applications) in your browser, and complete the following procedure.



1. Under <DNT>**Applications**</DNT>, type `newrelic` in the search bar, and click the <DNT>**Show apps that create custom IAM roles or resource policies**</DNT> check-box to find `newrelic-aws-otel-log-ingestion`.
2. Open the `newrelic-aws-otel-log-ingestion` details and click <DNT>**Deploy**</DNT>.
3. In the function's <DNT>**Configure**</DNT> menu, go to <DNT>**Environment Variables**</DNT> and configure log forwarding using the following environment variables:


<table>
<thead>
<tr>
<th style={{ width: "200px" }}>
Key
</th>
<th>
Default value
</th>
<th>
Options
</th>
<th>
Description
</th>
</tr>
</thead>

<tbody>

<tr>
<td>
`NR_OTEL_LOGGING_ENABLED`
</td>
<td>
true
</td>
<td>
`true`,`false`
</td>
<td>
Determines if logs are forwarded to the New Relic UI
</td>

</tr>

<tr>
<td>
`DEBUG_LOGGING_ENABLED`
</td>
<td>
false
</td>
<td>
`true`,`false`
</td>

<td>
A Boolean to determine if you want to output debug messages in the CloudWatch console.
</td>
</tr>

<tr>
<td>
`LICENSE_KEY`
</td>

<td>
<InlinePopover type="licenseKey" /> is used for sending data to New Relic. **Required.**
</td>
</tr>

</tbody>
</table>

</Step>


<Step>
Acknowledge that the app creates custom IAM roles, and then click <DNT>**Deploy**</DNT>.

</Step>

<Step>

Once the process in the step above completes, create a Lambda trigger to link your Lambda function to CloudWatch logs.
To get your logs streaming to New Relic UI, attach a trigger to the Lambda in the AWS UI:

1. From the left side menu, select <DNT>**Functions**</DNT>.
2. Find and select the previously created `newrelic-aws-otel-log-ingestion` function.
3. Under <DNT>**Triggers**</DNT>, click <DNT>**Add Triggers**</DNT>, and select <DNT>**CloudWatch Logs**</DNT> from the dropdown.
4. Select the the appropriate <DNT>**Log group**</DNT> for your application.
5. Enter a name for your filter.
6. Optional: Enter a [filter pattern](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html).
7. Check the <DNT>**Enable trigger**</DNT> checkbox, then click <DNT>**Add**</DNT> to create the trigger.

<Callout variant="caution">
On the ingestion function, ensure that you set up a trigger, not a log subscription. Setting up a subscription in the Lambda console can lead to a cascade of logs generated and forwarded to New Relic.

</Callout>

<CollapserGroup>
<Collapser
id="config-endpoints"
title="Optional: Configure different logging endpoints"
>

You can set a custom logging endpoint if needed, this will allow you for example to use our FedRAMP compliant endpoints.

For that, you should deploy the application and explained above and then:


1. Go to the recently deployed lambda function view in AWS.
2. Scroll down and click on the <DNT>**Configuration**</DNT> tab.
3. On the left menu inside the <DNT>**Configuration**</DNT> tab, click on <DNT>**Environment Variables**</DNT>.
4. Here you can see a list of the already existing environment variables, just click <DNT>**Edit**</DNT> on the top right of the <DNT>**Environment Variables**</DNT> table.
5. Update the `NR_OTEL_LOGGING_ENDPOINT` with the appropiate endpoint:
- US_OTEL_LOGGING_ENDPOINT: `https://otlp.nr-data.net:4318/v1/logs`
- EU_OTEL_LOGGING_ENDPOINT : `https://otlp.eu01.nr-data.net:4318/v1/logs`
- For FedRAMP: `https://gov-log-api.newrelic.com/log/v1`
6. Click <DNT>**Save**</DNT>.

</Collapser>
</CollapserGroup>


</Step>

</Steps>




3 changes: 2 additions & 1 deletion src/data/whats-new-ids.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,5 +339,6 @@
"/whats-new/2024/08/whats-new-08-12-synthetics-browsers": "42995",
"/whats-new/2024/05/whats-new-05-08-sessiontraces": "42996",
"/whats-new/2024/07/whats-new-07-02-apmk8s": "42997",
"/whats-new/2024/08/whats-new-8-15-one-step-AWS": "42998"
"/whats-new/2024/08/whats-new-8-15-one-step-AWS": "42998",
"/whats-new/2024/08/Configure_incident_titles": "42999"
}
2 changes: 2 additions & 0 deletions src/nav/serverless-function-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ pages:
path: /docs/serverless-function-monitoring/aws-lambda-monitoring/opentelemetry/lambda-opentelemetry-java
- title: Trace your .NET Lambda functions with New Relic and OpenTelemetry
path: /docs/serverless-function-monitoring/aws-lambda-monitoring/opentelemetry/lambda-opentelemetry-dotnet
- title: Forward your Lambda function logs with OpenTelemetry
path: /docs/serverless-function-monitoring/aws-lambda-monitoring/opentelemetry/otel-adot-log-ingestion-serverless
- title: UI and data
pages:
- title: Understand and use the UI
Expand Down
Loading