Skip to content

Commit

Permalink
Removed option 3. Added Supported Frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
kford-newrelic committed Mar 23, 2022
1 parent 4e948e9 commit c25d9cf
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions src/content/docs/logs/logs-everywhere/java-telemetry-context.mdx
Expand Up @@ -3,22 +3,22 @@ title: 'Java Telemetry in Context (TiC)'
metaDescription: For apps monitored by the Java agent, learn how to link log data with related data across the rest of the New Relic platform.
---

[Telemetry in context](https://docswebsitedevelop-doc7761logsintro.gtsb.io/docs/logs/logs-everywhere/telemetry-in-context/) for the Java agent connects your logs with all of your telemetry data for your apps, hosts, and other entities. Bringing all of this data together in a single tool helps you quickly:
[Telemetry in Context](https://docswebsitedevelop-doc7761logsintro.gtsb.io/docs/logs/logs-everywhere/telemetry-in-context/) for the Java agent connects your logs with all of your telemetry data for your apps, hosts, and other entities. Bringing all of this data together in a single tool helps you quickly:

* Cut through the noise of thousands of logs when troubleshooting time-critical issues, so you automatically see only the most relevant logs.
* Navigate within multiple types of telemetry data and have the data correlate back to the original issue.
* Easily drill down into more detailed information from the same place in the UI.
* Find the log lines that you need to identify and resolve a problem.

![Telemetry in context in APM UI](./images/ruby-errors-log-details.png "Telemetry in context in APM UI")
![Telemetry in Context in APM UI](./images/ruby-errors-log-details.png "Telemetry in Context in APM UI")

<figcaption>
**Telemetry in context:** From the left nav in the APM UI, you can select an error and immediately see related logs, log details, host name, important attributes, and more.
**Telemetry in Context:** From the left nav in the APM UI, you can select an error and immediately see related logs, log details, host name, important attributes, and more.
</figcaption>

## Enable and configure [#enable]

You have three options to configure telemetry in context for your application.
If you are using a [supported framework](#frameworks), you have two options to configure Telemetry in Context for your application.

<CollapserGroup>

Expand All @@ -27,7 +27,7 @@ You have three options to configure telemetry in context for your application.
title="Option 1 (recommended): Let the agent forward your logs."
>

This is the simplest approach, and it's a great choice for developers who may not have the access or interest in setting up a log forwarder, or for accounts that want to see the power of logs and other telemetry in context without a lot of overhead.
This is the simplest approach and it's a great choice for developers who may not have the access or interest in setting up a log forwarder, or for accounts that want to see the power of logs and other Telemetry in Context features quickly.

<Callout variant="important">
Using the log forwarding feature will increase your data ingest, which may affect your billing. For more information, see our documentation about [tracking your data ingest](https://docswebsitedevelop-doc7761logsintro.gtsb.io/docs/logs/logs-everywhere/telemetry-in-context/#ingest).
Expand Down Expand Up @@ -97,7 +97,7 @@ You have three options to configure telemetry in context for your application.
Already have a log forwarder you like? We've got you covered! The Java agent can decorate your logs with the linking metadata needed to provide access to Telemetry-in-Context features and you can send them to New Relic using your existing log fowarder.

<Callout variant="tip">
This option *replaces* our legacy [Logs In Context formatter](https://docswebsitedevelop-doc7761logsintro.gtsb.io/docs/logs/logs-context/java-configure-logs-context-all/).
This option *replaces* our legacy [Logs In Context](https://docswebsitedevelop-doc7761logsintro.gtsb.io/docs/logs/logs-context/java-configure-logs-context-all/) decorator.
</Callout>

1. Be sure to **disable** agent log forwarding, otherwise you will be unnecessarily sending double log lines.
Expand Down Expand Up @@ -141,28 +141,24 @@ You have three options to configure telemetry in context for your application.
```


Our decorator adds five attributes to every log message: `entity.guid`, `hostname`, `trace.id`, `span.id` and `entity.name`. Example:
Our decorator adds five attributes to every log message in your application log file: `entity.guid`, `hostname`, `trace.id`, `span.id` and `entity.name`. For example:

```
This is my log message. NR-LINKING|{entity.guid}|{hostname}|{trace.id}|{span.id}|{entity.name}|
```

</Collapser>
</CollapserGroup>

<Collapser
id="3-old-formatter"
title="Option 3: Use the old decorating formatter."
>
## Supported frameworks [#frameworks]

Before language agents had the ability to forward and decorate logs, you could enable logs in context by updating your application to use the `NewRelic::Agent::Logging::DecoratingFormatter` to send linking metadata.

This option is still supported, but is no longer encouraged. For instructions to use this approach, see [Ruby: Configure logs in context](https://docs.newrelic.com/docs/logs/logs-context/configure-logs-context-ruby/).
The Telemetry in Context feature supports the following logging frameworks:

Also, this method requires that you install a log forwarder before enabling logs in context. If you do not have a log forwarder, the New Relic One UI will prompt you to use our [infrastructure agent](https://docs.newrelic.com/docs/logs/forward-logs/forward-your-logs-using-infrastructure-agent/).
If you decide to use your existing log forwarding solution and later decide to update your agent to use Telemetry in Context, be sure to **disable your old log forwarder**. Otherwise, your app will be sending double log lines. Depending on your account, this could result in double billing. For more information, see our documentation about [tracking your data ingest](https://docswebsitedevelop-doc7761logsintro.gtsb.io/docs/logs/logs-everywhere/telemetry-in-context/#ingest).
</Collapser>
</CollapserGroup>
* Log4j 1.x
* Log4j 2.x
* Logback 1.x

If you are using a different logging framework, our legacy [Logs in Context](https://docswebsitedevelop-doc7761logsintro.gtsb.io/docs/logs/logs-context/java-configure-logs-context-all/) solution might be right for you.

## Secure your data [#obfuscation]

Expand Down

0 comments on commit c25d9cf

Please sign in to comment.