Skip to content

Commit

Permalink
Merge pull request #19035 from newrelic/develop
Browse files Browse the repository at this point in the history
Daily release/oct 22 2024 11 04
  • Loading branch information
sunnyzanchi authored Oct 22, 2024
2 parents 85688ee + 4066505 commit a9f8d4f
Show file tree
Hide file tree
Showing 139 changed files with 3,458 additions and 3,193 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@emotion/styled": "^11.3.0",
"@mdx-js/mdx": "2.0.0-next.8",
"@mdx-js/react": "2.0.0-next.8",
"@newrelic/gatsby-theme-newrelic": "9.8.1",
"@newrelic/gatsby-theme-newrelic": "9.10.3",
"@splitsoftware/splitio-react": "^1.2.4",
"ansi-colors": "^4.1.3",
"cockatiel": "^3.0.0-beta.0",
Expand Down
4 changes: 3 additions & 1 deletion scripts/actions/webdriver-desktop.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ const navTest = async () => {
};

const searchTest = async () => {
const [searchInput] = await waitForXPath('//aside//input');
const [searchInput] = await waitForXPath(
'.//input[@placeholder="Search docs"]'
);
console.log('\nClicking search input');
await searchInput.click();
const activeEl = await driver.executeScript('return document.activeElement');
Expand Down
5 changes: 3 additions & 2 deletions scripts/actions/webdriver-mobile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const main = async () => {
await driver.get(testUrl + 'docs/mdx-test-page/');
await navTest();
await collapserTest();
await searchTest();
// TODO: reenable after fixing mobile search focus behavior
// await searchTest();

// this step isn't necessary in synthetics
await driver.quit();
Expand Down Expand Up @@ -106,7 +107,7 @@ const navTest = async () => {
};

const searchTest = async () => {
const [searchButton] = await waitForXPath('//a[contains(@href, "?q=")]');
const [searchButton] = await waitForXPath('.//*[@id="mobile-search-expand"]');
console.log('\nClicking search input');
await searchButton.click();
// sleep is required here on mobile to account for the click delay
Expand Down
14 changes: 8 additions & 6 deletions src/components/HomepageBanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ const HomepageBanner = () => {
searchTerm,
searchLocation: 'homepage',
});
navigate(`?q=${searchTerm || ''}`);
if (searchTerm !== '') {
navigate(`search-results/?query=${searchTerm}&page=1`);
}
}}
css={css`
max-width: 880px;
Expand Down Expand Up @@ -116,19 +118,19 @@ const HomepageBanner = () => {
`}
>
<p>{t('strings.home.search.popularSearches.title')}: </p>
<Link to="?q=nrql">
<Link to="/search-results/?query=nrql&page=1">
{t('strings.home.search.popularSearches.options.0')},
</Link>
<Link to="?q=logs">
<Link to="/search-results/?query=logs&page=1">
{t('strings.home.search.popularSearches.options.1')},
</Link>
<Link to="?q=alert">
<Link to="/search-results/?query=alert&page=1">
{t('strings.home.search.popularSearches.options.2')},
</Link>
<Link to="?q=best practices">
<Link to="/search-results/?query=best practices&page=1">
{t('strings.home.search.popularSearches.options.3')},
</Link>
<Link to="?q=kubernetes">
<Link to="/search-results/?query=kubernetes&page=1">
{t('strings.home.search.popularSearches.options.4')}
</Link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Navigation = ({ nav, className }) => {
css={css`
height: 100%;
overflow: auto;
margin: 16px 0;
margin: 0 0 16px;
-ms-overflow-style: none;
scrollbar-width: none;
&::-webkit-scrollbar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,10 @@ Below are some sample requests to automate the creation of your synthetic monito
</Callout>

<Callout variant="important">
As of August 26, 2024, you can no longer create new monitors using legacy runtimes on public or private locations.
As of August 26, 2024, you can no longer create new monitors using legacy runtimes on public or private locations. On October 22, 2024, we will [end of life](/whats-new/2024/04/whats-new-04-09-eol-synthetics-runtime-cpm) the containerized private minion (CPM) and legacy synthetics runtime versions.

On October 22, 2024, we will [end of life](/whats-new/2024/04/whats-new-04-09-eol-synthetics-runtime-cpm) the containerized private minion (CPM) and legacy synthetics runtime versions. For public locations, use [the runtime upgrade UI](/docs/synthetics/synthetic-monitoring/using-monitors/runtime-upgrade-ui/) to update your monitors to the newest runtimes. For private locations, please review our [recommended migration steps](/docs/synthetics/synthetic-monitoring/private-locations/job-manager-transition-guide/#monitorMigration) to avoid monitor degradation.
* For public locations, use [the runtime upgrade UI](/docs/synthetics/synthetic-monitoring/using-monitors/runtime-upgrade-ui/) to update your monitors to the newest runtimes.
* For private locations, please review our [recommended migration steps](/docs/synthetics/synthetic-monitoring/private-locations/job-manager-transition-guide/#monitorMigration) to avoid monitor degradation.
</Callout>

<CollapserGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: PHP Agent overhead reduction tips
type: troubleshooting
tags:
- Agents
- PHP agent
- Troubleshooting
metaDescription: Agent settings to decrease overhead.
freshnessValidatedDate: 2024-10-21
---

## Problem

Using the New Relic PHP agent results in overhead.

## Cause

Overhead is an expected side effect of monitoring and reporting on software. Our engineers aim to minimize this, but your experience may differ quite a lot, depending on how you're using the agent. If you find that you're experiencing unexpected overhead, there are are various settings in the `INI` that can help reduce it.

## Solution
Performance INI settings that can reduce overhead depending on your agent usage.

1. Reduce [`newrelic.span_events.max_samples_stored`](/docs/apm/agents/php-agent/configuration/php-agent-configuration/#inivar-span-events-max-samples-stored).

2. Disable [code level metrics](/docs/apm/agents/php-agent/configuration/php-agent-configuration/#inivar-code-level-metrics).

3. Disable [logging](/docs/apm/agents/php-agent/configuration/php-agent-configuration/#log-forwarding).

4. Set [`newrelic.transaction_tracer.max_segments_web`](/docs/apm/agents/php-agent/configuration/php-agent-configuration/#inivar-tt-maxsegweb) and [`newrelic.transaction_tracer.max_segments_cli`](/docs/apm/agents/php-agent/configuration/php-agent-configuration/#inivar-tt-maxsegcli) >= 1.

5. Set [`newrelic.transaction_tracer.detail`](/docs/apm/agents/php-agent/configuration/php-agent-configuration/#inivar-tt-detail) = 0.

6. Set [`newrelic.transaction_tracer.enabled`](/docs/agents/php-agent/configuration/php-agent-configuration#inivar-tt-enabled) = false.

7. Increase the [transaction tracer threshold](/docs/agents/php-agent/configuration/php-agent-configuration#inivar-tt-threshold) by setting `newrelic.transaction_tracer.threshold` = higher value.

8. Set [`newrelic.transaction_tracer.explain_enabled`](/docs/agents/php-agent/configuration/php-agent-configuration#inivar-tt-explain-enabled) = false.

9. Don't trace slow SQL statements by setting [`newrelic.transaction_tracer.slow_sql`](/docs/agents/php-agent/configuration/php-agent-configuration#inivar-tt-slowsql) = false.


## Other overhead considerations
A non-performant clocksource can affect the agent which checks the time for every span. Please ensure you're using an appropriate [clocksource](https://forum.newrelic.com/s/hubtopic/aAX8W0000008a7rWAA/relic-solution-php-agent-cpu-overhead-tips).
Fargate is affected by clocksource and is known to cause additional [overhead](/docs/apm/agents/php-agent/troubleshooting/fargate-nitro-clock-performance-impact/).
4 changes: 2 additions & 2 deletions src/content/docs/data-apis/custom-data/aws-privatelink.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -776,11 +776,11 @@ These are the New Relic endpoint services available via AWS PrivateLink:
</td>

<td>
`infra-api.eu01.nr-data.net`
`infra-api.eu01.nr-data.net` and `infra-api.eu.newrelic.com`
</td>

<td>
`com.amazonaws.vpce.eu-central-1.vpce-svc-06d5b2d7e79ddd78e`
`com.amazonaws.vpce.eu-central-1.vpce-svc-06d5b2d7e79ddd78e` and `com.amazonaws.vpce.eu-central-1.vpce-svc-02fc7dd8d7be95a32`, respectively
</td>
</tr>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ Here's a detailed example of doing the above procedure for NGINX:
integrations:
- name: nri-nginx
env:
STATUS_URL: http://${'${discovery.ip}'}:/status
STATUS_URL: http://${discovery.ip}:${discovery.port}/status
REMOTE_MONITORING: true
METRICS: 1
```
Expand All @@ -311,7 +311,7 @@ Here's a detailed example of doing the above procedure for NGINX:
integrations:
- name: nri-nginx
env:
STATUS_URL: http://${'${discovery.ip}'}:/status
STATUS_URL: http://${discovery.ip}:${discovery.port}/status
REMOTE_MONITORING: true
METRICS: 1
path: /etc/newrelic-infra/integrations.d/nginx-config.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ To troubleshoot and resolve the problem:
</DNT>

```
nginx-server-metrics: {\"name\":\"com.newrelic.nginx\",\"protocol_version\":\"1\",\"integration_version\":\"0.5.0\",\"metrics\":
nri-nginx: {\"name\":\"com.newrelic.nginx\",\"protocol_version\":\"1\",\"integration_version\":\"0.5.0\",\"metrics\":
[{\"event_type\":\"NginxSample\",\"net.connectionsAcceptedPerSecond\":0.10344827586206896,\"net.connectionsActive\":1,
\"net.connectionsDroppedPerSecond\":0,\"net.connectionsReading\":0,\"net.connectionsWaiting\":0,\"net.connectionsWriting\":1,
\"net.requestsPerSecond\":0.10344827586206896,\"software.edition\":\"open source\",\"software.version\":\"1.4.6 (Ubuntu)\"}],\"inventory\":{},\"events\":[]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ These examples (for Docker-only environments and for Kubernetes) show how to con
image: /nginx/
label.env: production
integrations:
- name: nginx-server-metrics
command: metrics
- name: nri-nginx
env:
# use discovery.private.ip if container doesn't have attached public ip address
# use discovery.private.ip if container doesn't have attached public ip address
STATUS_URL: http://${discovery.ip}:${discovery.port}/status
STATUS_MODULE: discover
REMOTE_MONITORING: true
METRICS: 1
labels:
env: ${discovery.label.env}
role: ${discovery.label.role}
Expand Down Expand Up @@ -94,6 +93,7 @@ These examples (for Docker-only environments and for Kubernetes) show how to con
env:
# Use the discovered IP as the host address
STATUS_URL: http://${discovery.ip}/server-status?auto
REMOTE_MONITORING: true
METRICS: 1
```
</Collapser>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ The following licenses are for the plugins used to connects your log data with N

## Go plugins for Logs [#go-logs]

The following licenses are for the plugins used link your logs and APM data using New Relic's Go agent. For Go licenses, see [Go agent licenses](/docs/licenses/license-information/agent-licenses/go-agent-licenses).
The following licenses are for the plugins used to link your logs and APM data using New Relic's Go agent. For Go licenses, see [Go agent licenses](/docs/licenses/license-information/agent-licenses/go-agent-licenses).

<CollapserGroup>
<Collapser
Expand Down Expand Up @@ -261,7 +261,7 @@ The following licenses are for the plugins used link your logs and APM data usin

## Java plugins for Logs [#java-logs]

The following licenses are for the plugins used link your logs and APM data using New Relic's Java agent. For Java licenses, see [Java agent licenses](/docs/licenses/product-or-service-licenses/new-relic-apm/java-agent-licenses).
The following licenses are for the plugins used to link your logs and APM data using New Relic's Java agent. For Java licenses, see [Java agent licenses](/docs/licenses/product-or-service-licenses/new-relic-apm/java-agent-licenses).

<CollapserGroup>
<Collapser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ If you're not using a supported framework, you may instead use the agent's log f
This is my log message. NR-LINKING|{entity.guid}|{hostname}|{trace.id}|{span.id}|{entity.name}|
```

If the log message is empty or blank, output message will also be empty. Example:

```
NR-LINKING|{entity.guid}|{hostname}|{trace.id}|{span.id}|{entity.name}|.
```
The output log message will be an empty string.

Some attributes may be empty if the log occurred outside a transaction or if they are not applicable to your application's context.
We recommend this option over manually using one of our log enrichers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ redirects:
- /docs/logs/enable-log-monitoring-new-relic/logs-context-php/configure-logs-context-php
- /docs/logs/enable-log-management-new-relic/logs-context-php
- /docs/logs/enable-log-management-new-relic/logs-context-php/configure-logs-context-php
- /docs/logs/enable-log-management-new-relic/configure-logs-context/configure-logs-context-php
- /docs/logs/enable-log-management-new-relic/configure-logs-context/configure-logs-context-php
freshnessValidatedDate: never
---

Expand Down Expand Up @@ -134,14 +134,21 @@ The other option is to have the agent decorate log records with a token containi
$logfmt = "%channel%.%level_name%: %message% %extra.NR-LINKING%\n";
$formatter = new LineFormatter($logfmt);
$handler->setFormatter($formatter);
$logger->pushHandler($handler);
$logger->pushHandler($handler);
```

Our decorator adds five attributes to every log `message` (plain text): `entity.guid`, `entity.name`, `hostname`, `trace.id`, and `span.id`. Example:

```
This is my log message. NR-LINKING|{entity.guid}|{hostname}|{trace.id}|{span.id}|{entity.name}|
```
If the log message is empty or blank, output message will also be empty. Example:

```
NR-LINKING|{entity.guid}|{hostname}|{trace.id}|{span.id}|{entity.name}|.
```
The output log message will be an empty string.


5. To verify that you have configured the log appender correctly, run your application, then check your [logs data in New Relic](/docs/logs/log-management/ui-data/use-logs-ui/) using the query operator `has:span.id has:trace.id`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ You have three options to configure APM logs in context to send your app's logs
This is my log message. NR-LINKING|{entity.guid}|{hostname}|{trace.id}|{span.id}|{entity.name}|
```
If the log message is empty or blank, output message will also be empty. Example:
```
NR-LINKING|{entity.guid}|{hostname}|{trace.id}|{span.id}|{entity.name}|.
```
The output log message will be an empty string.
Some attributes may be empty if the log occurred outside a transaction or if they are not applicable to your application's context.

We recommend this option over the manual decorating formatter, `NewRelicContextFormatter`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ You have three options to configure <InlinePopover type="apm"/> logs in context
This is my log message. NR-LINKING|{entity.guid}|{hostname}|{trace.id}|{span.id}|{entity.name}|
```

If the log message is empty or blank, output message will also be empty. Example:

```
NR-LINKING|{entity.guid}|{hostname}|{trace.id}|{span.id}|{entity.name}|.
```
The output log message will be an empty string.

Some attributes may be empty if the log occurred outside a transaction or if they are not applicable to your application's context.

We recommend this option over the manual decorating formatter, `NewRelic::Agent::Logging::DecoratingFormatter`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ If you prefer to use your own log forwarder, rather than having the Java agent f
enabled: true
forwarding:
enabled: true
max_samples_stored: 10000
local_decorating:
max_samples_stored: 10000
local_decorating:
enabled: false
```

Expand Down Expand Up @@ -183,7 +183,7 @@ If you prefer to use your own log forwarder, rather than having the Java agent f
forwarding:
enabled: true
max_samples_stored: 10000
local_decorating:
local_decorating:
enabled: false
```

Expand Down Expand Up @@ -231,7 +231,7 @@ If you prefer to use your own log forwarder, rather than having the Java agent f
```yml
application_logging:
enabled: true
local_decorating:
local_decorating:
enabled: true
forwarding:
enabled: false
Expand Down Expand Up @@ -259,6 +259,13 @@ If you prefer to use your own log forwarder, rather than having the Java agent f
This is my log message. NR-LINKING|{entity.guid}|{hostname}|{trace.id}|{span.id}|{entity.name}|
```

If the log message is empty or blank, output message will also be empty. Example:

```
NR-LINKING|{entity.guid}|{hostname}|{trace.id}|{span.id}|{entity.name}|.
```
The output log message will be an empty string.

Some attributes may be empty if the log occurred outside a transaction or if they are not applicable to your application's context.
</Collapser>
</CollapserGroup>
Expand Down Expand Up @@ -508,7 +515,7 @@ If you need to use the manual process to set up logs in context for Java, follow
5. Use `NewRelicAsyncAppender` to wrap any appenders that will target New Relic's log forwarder. For example:

```xml
<appender name="NewRelicFile"
<appender name="NewRelicFile"
class="com.newrelic.logging.log4j1.NewRelicAsyncAppender">
<appender-ref ref="TypicalFile" />
</appender>
Expand Down Expand Up @@ -538,15 +545,15 @@ If you need to use the manual process to set up logs in context for Java, follow
</appender>
<!-- this appender was added -->
<appender name="NewRelicFile"
<appender name="NewRelicFile"
class="com.newrelic.logging.log4j1.NewRelicAsyncAppender">
<appender-ref ref="TypicalFile" />
</appender>
<appender name="TypicalConsole" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
</layout>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
</layout>
</appender>
<root> ​
Expand Down Expand Up @@ -737,7 +744,7 @@ If you need to use the manual process to set up logs in context for Java, follow
<root level="debug">
<!-- changed the root logger -->
<appender-ref ref="ASYNC" />
<appender-ref ref="ASYNC" />
</root>
</configuration>
Expand Down Expand Up @@ -766,12 +773,12 @@ If you need to use the manual process to set up logs in context for Java, follow
<!-- The required New Relic ASYNC appender wraps the FILE appender -->
<appender name="ASYNC" class="com.newrelic.logging.logback.NewRelicAsyncAppender">
<appender-ref ref="FILE" />
<appender-ref ref="FILE" />
</appender>
<root level="debug">
<!-- ASYNC is one of the main appenders -->
<appender-ref ref="ASYNC" />
<appender-ref ref="ASYNC" />
<!-- Send every message to normal console logging, as well. -->
<appender-ref ref="STDOUT" />
Expand Down
Loading

0 comments on commit a9f8d4f

Please sign in to comment.