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

Logs: Revise logging metrics explanation #16707

Merged
merged 3 commits into from
Mar 29, 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
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.
Loading