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

Simplify OpenTelemetry APM getting started documentation #17372

Merged
merged 15 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

One thing worse discussing: We've removed any sort of general setup instructions, instead redirecting folks to language specific setup which are all are telling readers the same set of things. We have 6 sets of language specific examples while there are 11 otel language APIs / SDKs in some stage of development. If a user asks how to setup in a language we haven't provided an example for yet (seems inevitable) do you think we should just add a new example for that language rather than provide some generic set of instructions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jack-berg I think we could add a line saying, "If you're looking for more language-specific examples, submit a request (add link to do this, such as submitting a GitHub issue)"

cc @alanwest thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea @ally-sassman. Gives the user a concrete call to action, and provides us with a signal that someone is actively interested in an additional example.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Original file line number Diff line number Diff line change
Expand Up @@ -16,64 +16,91 @@ import moreintegrationsNativeOtlpNoCollector from 'images/more-integrations_diag

import moreintegrationsNativeOtlpWithCollector from 'images/more-integrations_diagram_native-otlp-with-collector.webp'

OpenTelemetry provides general purpose APIs and SDKs for collecting, processing, and exporting observability data. One of the most popular use cases for these APIs and SDKs is APM monitoring, where instrumentation is installed to monitor an app or service.
OpenTelemetry provides general purpose APIs and SDKs for collecting, processing,
and exporting observability data. One of the most popular use cases for these
APIs and SDKs is APM monitoring, where instrumentation is installed to monitor
an app or service.

This page describes common set up steps for OpenTelemetry based APM monitoring with New Relic. For some languages, we provide working code examples:

* [Java example](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/apm-monitoring/opentelemetry-apm-java)
* [Python example](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/apm-monitoring/opentelemetry-apm-python)
This page describes common set up steps for OpenTelemetry based APM monitoring
with New Relic.

<Steps>
<Step>
## Before you start [#prereqs]

* If you haven't already done so, sign up for a free [New Relic account](https://newrelic.com/signup).
* Get the [license key](https://one.newrelic.com/launcher/api-keys-ui.launcher) for the New Relic account to which you want to report data.
* [Sign up](https://newrelic.com/signup) for a New Relic account.
* Get the [license key](https://one.newrelic.com/launcher/api-keys-ui.launcher)
for the New Relic account to which you want to report data.
</Step>

<Step>
## Instrument your app or service with OpenTelemetry [#instrument]

OpenTelemetry provides [language-specific APIs and SDKs](https://opentelemetry.io/docs/languages/), and [instrumentation](https://opentelemetry.io/docs/concepts/instrumentation/) for popular libraries and frameworks which utilizes the APIs. The mechanism for installing instrumentation varies: some languages support [zero code](https://opentelemetry.io/docs/concepts/instrumentation/zero-code/) (or automatically installed) instrumentation akin to New Relic agents, others support [instrumentation libraries](https://opentelemetry.io/docs/concepts/instrumentation/libraries/) which require some manual installation, and some libraries and frameworks are natively instrumented with OpenTelemetry.

For details about what instrumentation is available, and installation instructions, please see the relevant [OpenTelemetry language documentation](https://opentelemetry.io/docs/languages/).
</Step>

<Step>
## Configure export to New Relic via OTLP [#configure-oltp-export]

New Relic supports [native OTLP ingest](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-otlp/).
OpenTelemetry provides
[language-specific APIs and SDKs](https://opentelemetry.io/docs/languages/)
for instrumenting applications. Most languages provide a rich set of
[instrumentation](https://opentelemetry.io/docs/concepts/instrumentation/)
for popular libraries and frameworks.

To help you get started, we offer a simple example application in a variety of
languages. For each language, the application is built using web framework popular
to that language. The examples demonstrate how to configure:

1. The service name which will display in New Relic.
alanwest marked this conversation as resolved.
Show resolved Hide resolved
2. The OpenTelemetry Protocol (OTLP) exporter to send data to New Relic.
alanwest marked this conversation as resolved.
Show resolved Hide resolved
3. Additional recommended settings to optimize OpenTelemetry for the best New
Relic experience.

<TechTileGrid>
<TechTile
name="Go agent"
icon="logo-go"
to="https://github.com/newrelic/newrelic-opentelemetry-examples/tree/main/getting-started-guides/go"
/>

There are two options for exporting OpenTelemetry APM data to New Relic via OTLP:
<TechTile
name="Java"
icon="logo-java"
to="https://github.com/newrelic/newrelic-opentelemetry-examples/tree/main/getting-started-guides/java"
/>

* **Directly from your app.** Each OpenTelemetry language SDK comes packaged with OTLP exporters. Configure the SDK to export via OTLP. Consult relevant OpenTelemetry documentation and ensure [configuration matches New Relic OTLP requirements](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-otlp/).
<TechTile
name=".NET"
icon="logo-dotnet"
to="https://github.com/newrelic/newrelic-opentelemetry-examples/tree/main/getting-started-guides/dotnet"
/>

<img
title="Diagram showing a direct export to New Relic to your app"
alt="Diagram showing a direct export to New Relic to your app"
src={moreintegrationsNativeOtlpNoCollector}
<TechTile
name="Node.js"
icon="logo-nodejs"
to="https://github.com/newrelic/newrelic-opentelemetry-examples/tree/main/getting-started-guides/javascript"
/>

<figcaption>
The OTLP exporter in your app or service can export directly to the New Relic OTLP endpoint.
</figcaption>
* **Export from an OpenTelemetry Collector.** Configure the app to export to an intermediate OpenTelemetry collector, and from the collector to New Relic via OTLP. Ensure the collector's OTLP exporter [configuration matches New Relic OTLP requirements](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-otlp/). See [Collector for Processing](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/collector-pipeline/opentelemetry-collector-pipeline-intro) for more details.
<!--
<TechTile
name="PHP"
icon="logo-php"
to="https://github.com/newrelic/newrelic-opentelemetry-examples/tree/main/getting-started-guides/php"
/>
-->

<img
title="Diagram showing the export to New Relic from a collector"
alt="Diagram showing the export to New Relic from a collector"
src={moreintegrationsNativeOtlpWithCollector}
<TechTile
name="Python"
icon="logo-python"
to="https://github.com/newrelic/newrelic-opentelemetry-examples/tree/main/getting-started-guides/python"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/>

<figcaption>
The OpenTelemetry Collector can act as a gateway to process APM telemetry data before sending to New Relic via OTLP.
</figcaption>
</Step>
<TechTile
name="Ruby"
icon="logo-ruby"
to="https://github.com/newrelic/newrelic-opentelemetry-examples/tree/main/getting-started-guides/ruby"
/>

<Step>
## Configure your app with APM resource attributes [#configure-resource]
</TechTileGrid>

New Relic requires that apps and services monitored with OpenTelemetry contain certain [resource attributes](https://opentelemetry.io/docs/concepts/resources/) like `service.name` and `telemetry.sdk.name`. Others like `service.instance.id` are recommended. See [Service entities](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-best-practices-resources/#services) for more information.
For more information about what instrumentation is available and more advanced
scenarios, please see the relevant
[OpenTelemetry language documentation](https://opentelemetry.io/docs/languages/).

</Step>

Expand Down
Loading
Loading