Skip to content

Commit

Permalink
Merge pull request #16707 from newrelic/rhs-clarify-log-metrics-wording
Browse files Browse the repository at this point in the history
Logs: Revise logging metrics explanation
  • Loading branch information
rhetoric101 committed Mar 29, 2024
2 parents 1ebbc78 + 247883c commit ba85105
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/content/docs/logs/logs-context/get-started-logs-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ redirects:
freshnessValidatedDate: never
---


import apmLogsOverview from 'images/apm_screenshot-full_logs-overview.webp'

import apmViewLimitsUsage from 'images/apm_screenshot-full_view-limits-usage.webp'
Expand All @@ -18,6 +19,9 @@ import apmLogsContextPatternsTwo from 'images/apm_screenshot-crop_logs-context-p

import apmLogsCroppedUi from 'images/apm_screenshot-crop_logs-cropped-ui.webp'

import logsLoggingMetrics from 'images/logs_screenshot-crop_logging-metrics.webp'



There are [several ways to report your logs to New Relic](/docs/logs/get-started/get-started-log-management). Using our APM agents is one popular way, especially for smaller teams and DevOps teams that value the benefit of not having to use any other <InlinePopover type="logs" /> tools.

Expand Down Expand Up @@ -161,14 +165,29 @@ For more on these options, see the agent-specific logs-in-context docs.

## Log metrics [#log-metrics]

The logging metrics reported by <InlinePopover type="apm" /> agents are displayed on the <DoNotTranslate>**Logs**</DoNotTranslate> chart on the APM <DoNotTranslate>**Summary**</DoNotTranslate> page. These metrics are separate from the [log forwarding feature](#apm-logs-defined) and cannot be disabled at the account level. To disable logging metrics, see the dedicated APM configuration docs (for example, [this `logging_metrics` config option for PHP](/docs/apm/agents/php-agent/configuration/php-agent-configuration/#cfg-application_logging_metrics-enabled)).
When you set up an <InlinePopover type="apm" /> agent, you automatically get a chart of logging metrics on the APM <DoNotTranslate>**Summary**</DoNotTranslate> page:

<img
style={{ align: 'left',maxWidth: '70%' }}
title="Screenshot showing the logging metrics chart"
alt="Screenshot showing the logging metrics chart"
src={logsLoggingMetrics}
/>

This chart shows a count of logs. If you haven't disabled APM log forwarding, you can click on the chart links that will take you to the logs themselves. Even if you turn off APM log forwarding, this chart still shows the potential logs you could inspect if you had APM log forwarding enabled.

Logging metrics are reported via the `apm.service.logging.lines` attribute, as shown in the following query:

```sql
SELECT count(apm.service.logging.lines) FROM Metric WHERE (entity.guid = 'AN_ENTITY_GUID') LIMIT MAX SINCE 60 seconds AGO TIMESERIES
```

If you don't want to see the logging metrics chart, you can turn it off&mdash;but not at the account level. To disable logging metrics, see the dedicated APM configuration docs for your agent (for example, [this `logging_metrics` config option for PHP](/docs/apm/agents/php-agent/configuration/php-agent-configuration/#cfg-application_logging_metrics-enabled)).

<Callout variant="important">
If you disable logging metrics, that doesn't turn off the APM log forwarding feature. To stop forwarding APM logs, see [Manage or disable APM logs in context](/docs/logs/logs-context/disable-automatic-logging/).
</Callout>

## Prevent duplicate logs [#duplicate-logs]

Using logs in context functionality will increase your data ingest. Depending on your account's pricing model, this may have an impact on your ingest limits and billing.
Expand Down
Binary file not shown.

0 comments on commit ba85105

Please sign in to comment.