-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2d5678b
Simplify OpenTelemetry APM getting started documentation
alanwest 7276ab1
Remove commented out PHP tile
alanwest 8df177b
Merge branch 'develop' into alanwest/otel-apm
alanwest 050d053
Delete translations
alanwest d7e6fd2
Move OpenTelemetry APM UI page
alanwest a96f684
Add some links
alanwest f2a93c8
Link to APM UI
alanwest db28e49
fix(OTEL): add redirect links for deleted/moved pages
ally-sassman 0ee2e98
fix(OTEL): minor formatting updates, add doNotTranslate tags to UI el…
ally-sassman 49edb76
Merge branch 'develop' into alanwest/otel-apm
alanwest adafd84
We support all the languages
alanwest 0db1cf1
Merge branch 'alanwest/otel-apm' of github.com:alanwest/docs-website …
alanwest d2aa864
Update src/content/docs/more-integrations/open-source-telemetry-integ…
alanwest ff6e871
fix(OTEL): phrasing of callout
ally-sassman 4ce89f4
Merge branch 'develop' into alanwest/otel-apm
ally-sassman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,83 +10,111 @@ metaDescription: Set up OpenTelemetry-based APM monitoring with New Relic. | |
freshnessValidatedDate: 2024-05-14 | ||
redirects: | ||
- /docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/opentelemetry-set-up-your-app/ | ||
- /docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/apm-monitoring/opentelemetry-apm-java | ||
- /docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/apm-monitoring/opentelemetry-apm-python | ||
--- | ||
|
||
import moreintegrationsNativeOtlpNoCollector from 'images/more-integrations_diagram_native-otlp-no-collector.webp' | ||
|
||
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 below demonstrate how to configure: | ||
|
||
* The service name which will display in New Relic. | ||
* The OpenTelemetry Protocol (OTLP) exporter to send data to the | ||
[New Relic OTLP endpoint](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-otlp). | ||
* 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="Python" | ||
icon="logo-python" | ||
to="https://github.com/newrelic/newrelic-opentelemetry-examples/tree/main/getting-started-guides/python" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reminder to merge newrelic/newrelic-opentelemetry-examples#598 |
||
/> | ||
|
||
<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="Ruby" | ||
icon="logo-ruby" | ||
to="https://github.com/newrelic/newrelic-opentelemetry-examples/tree/main/getting-started-guides/ruby" | ||
/> | ||
|
||
<figcaption> | ||
The OpenTelemetry Collector can act as a gateway to process APM telemetry data before sending to New Relic via OTLP. | ||
</figcaption> | ||
</Step> | ||
</TechTileGrid> | ||
|
||
<Step> | ||
## Configure your app with APM resource attributes [#configure-resource] | ||
For more information about what instrumentation is available and more advanced | ||
scenarios, see the relevant | ||
[OpenTelemetry language documentation](https://opentelemetry.io/docs/languages/). | ||
|
||
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. | ||
<Callout variant="important"> | ||
You can use any language that OpenTelemetry supports to send data to New Relic. However, the examples above reflect only a subset of the [supported languages](https://opentelemetry.io/docs/languages/). | ||
|
||
Missing your language? Request an example by [opening an issue on GitHub](https://github.com/newrelic/newrelic-opentelemetry-examples/issues/new?assignees=&labels=enhancement%2C+needs-triage&projects=&template=enhancement.md&title=)! | ||
</Callout> | ||
|
||
</Step> | ||
|
||
<Step> | ||
## View your data in the New Relic UI [#view-data] | ||
|
||
With your app instrumented and configured to export data to New Relic, you should be able to find your data in the New Relic UI: | ||
Onec your app is instrumented and configured to export data to New Relic, you should be able to find your data in the New Relic UI: | ||
|
||
- Find your entity at **All entities -> Services - OpenTelemetry**. The entity name is set to the value of the app's `service.name` resource attribute. | ||
- Use [NRQL](/docs/nrql/get-started/introduction-nrql-new-relics-query-language/) to query directly for [traces](https://one.newrelic.com/launcher/nr1-core.explorer?overlay=eyJuZXJkbGV0SWQiOiJkYXRhLWV4cGxvcmF0aW9uLnF1ZXJ5LWJ1aWxkZXIiLCJpbml0aWFsQWN0aXZlSW50ZXJmYWNlIjoibnJxbEVkaXRvciIsImluaXRpYWxOcnFsVmFsdWUiOiIiLCJpbml0aWFsUXVlcmllcyI6W3sibnJxbCI6IkZST00gU3BhbiBTRUxFQ1QgY291bnQoKikgd2hlcmUgbmV3cmVsaWMuc291cmNlPSclb3RscCUnIFRJTUVTRVJJRVMifV0sImluaXRpYWxDaGFydFNldHRpbmdzIjp7ImNoYXJ0VHlwZSI6IkNIQVJUX0xJTkUiLCJsaW1pdCI6NzU0MiwibGlua2VkRW50aXR5R3VpZCI6bnVsbCwibGlua2VkRGFzaGJvYXJkSWQiOm51bGwsInlTY2FsZSI6eyJzdGF0aWMiOmZhbHNlLCJkb21haW4iOltudWxsLG51bGxdfSwieVplcm8iOnRydWV9fQo=), [metrics](https://one.newrelic.com/launcher/nr1-core.explorer?overlay=eyJuZXJkbGV0SWQiOiJkYXRhLWV4cGxvcmF0aW9uLnF1ZXJ5LWJ1aWxkZXIiLCJpbml0aWFsQWN0aXZlSW50ZXJmYWNlIjoibnJxbEVkaXRvciIsImluaXRpYWxOcnFsVmFsdWUiOiIiLCJpbml0aWFsUXVlcmllcyI6W3sibnJxbCI6IkZST00gTWV0cmljIFNFTEVDVCBjb3VudCgqKSB3aGVyZSBuZXdyZWxpYy5zb3VyY2UgTElLRSAnJW90bHAlJyBUSU1FU0VSSUVTIn1dLCJpbml0aWFsQ2hhcnRTZXR0aW5ncyI6eyJjaGFydFR5cGUiOiJDSEFSVF9MSU5FIiwibGltaXQiOjc1NDIsImxpbmtlZEVudGl0eUd1aWQiOm51bGwsImxpbmtlZERhc2hib2FyZElkIjpudWxsLCJ5U2NhbGUiOnsic3RhdGljIjpmYWxzZSwiZG9tYWluIjpbbnVsbCxudWxsXX0sInlaZXJvIjp0cnVlfX0K), and [logs](https://one.newrelic.com/launcher/nr1-core.explorer?overlay=eyJuZXJkbGV0SWQiOiJkYXRhLWV4cGxvcmF0aW9uLnF1ZXJ5LWJ1aWxkZXIiLCJpbml0aWFsQWN0aXZlSW50ZXJmYWNlIjoibnJxbEVkaXRvciIsImluaXRpYWxOcnFsVmFsdWUiOiIiLCJpbml0aWFsUXVlcmllcyI6W3sibnJxbCI6IkZST00gTG9nIFNFTEVDVCBjb3VudCgqKSB3aGVyZSBuZXdyZWxpYy5zb3VyY2U9JyVvdGxwJScgVElNRVNFUklFUyJ9XSwiaW5pdGlhbENoYXJ0U2V0dGluZ3MiOnsiY2hhcnRUeXBlIjoiQ0hBUlRfTElORSIsImxpbWl0Ijo3NTQyLCJsaW5rZWRFbnRpdHlHdWlkIjpudWxsLCJsaW5rZWREYXNoYm9hcmRJZCI6bnVsbCwieVNjYWxlIjp7InN0YXRpYyI6ZmFsc2UsImRvbWFpbiI6W251bGwsbnVsbF19LCJ5WmVybyI6dHJ1ZX19Cg==). | ||
- See [Overview of OpenTelemetry data in the UI](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/view-your-data/opentelemetry-view-your-data) for more information. | ||
* Find your entity at <DoNotTranslate>**All entities -> Services - OpenTelemetry**</DoNotTranslate>. The entity name is set to the value of the app's `service.name` resource attribute. For more information on how New Relic service entities are derived from OpenTelemetry resource attributes, see [Services](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-best-practices-resources/#services) | ||
* Use [NRQL](/docs/nrql/get-started/introduction-nrql-new-relics-query-language/) to query directly for [traces](https://one.newrelic.com/launcher/nr1-core.explorer?overlay=eyJuZXJkbGV0SWQiOiJkYXRhLWV4cGxvcmF0aW9uLnF1ZXJ5LWJ1aWxkZXIiLCJpbml0aWFsQWN0aXZlSW50ZXJmYWNlIjoibnJxbEVkaXRvciIsImluaXRpYWxOcnFsVmFsdWUiOiIiLCJpbml0aWFsUXVlcmllcyI6W3sibnJxbCI6IkZST00gU3BhbiBTRUxFQ1QgY291bnQoKikgd2hlcmUgbmV3cmVsaWMuc291cmNlPSclb3RscCUnIFRJTUVTRVJJRVMifV0sImluaXRpYWxDaGFydFNldHRpbmdzIjp7ImNoYXJ0VHlwZSI6IkNIQVJUX0xJTkUiLCJsaW1pdCI6NzU0MiwibGlua2VkRW50aXR5R3VpZCI6bnVsbCwibGlua2VkRGFzaGJvYXJkSWQiOm51bGwsInlTY2FsZSI6eyJzdGF0aWMiOmZhbHNlLCJkb21haW4iOltudWxsLG51bGxdfSwieVplcm8iOnRydWV9fQo=), [metrics](https://one.newrelic.com/launcher/nr1-core.explorer?overlay=eyJuZXJkbGV0SWQiOiJkYXRhLWV4cGxvcmF0aW9uLnF1ZXJ5LWJ1aWxkZXIiLCJpbml0aWFsQWN0aXZlSW50ZXJmYWNlIjoibnJxbEVkaXRvciIsImluaXRpYWxOcnFsVmFsdWUiOiIiLCJpbml0aWFsUXVlcmllcyI6W3sibnJxbCI6IkZST00gTWV0cmljIFNFTEVDVCBjb3VudCgqKSB3aGVyZSBuZXdyZWxpYy5zb3VyY2UgTElLRSAnJW90bHAlJyBUSU1FU0VSSUVTIn1dLCJpbml0aWFsQ2hhcnRTZXR0aW5ncyI6eyJjaGFydFR5cGUiOiJDSEFSVF9MSU5FIiwibGltaXQiOjc1NDIsImxpbmtlZEVudGl0eUd1aWQiOm51bGwsImxpbmtlZERhc2hib2FyZElkIjpudWxsLCJ5U2NhbGUiOnsic3RhdGljIjpmYWxzZSwiZG9tYWluIjpbbnVsbCxudWxsXX0sInlaZXJvIjp0cnVlfX0K), and [logs](https://one.newrelic.com/launcher/nr1-core.explorer?overlay=eyJuZXJkbGV0SWQiOiJkYXRhLWV4cGxvcmF0aW9uLnF1ZXJ5LWJ1aWxkZXIiLCJpbml0aWFsQWN0aXZlSW50ZXJmYWNlIjoibnJxbEVkaXRvciIsImluaXRpYWxOcnFsVmFsdWUiOiIiLCJpbml0aWFsUXVlcmllcyI6W3sibnJxbCI6IkZST00gTG9nIFNFTEVDVCBjb3VudCgqKSB3aGVyZSBuZXdyZWxpYy5zb3VyY2U9JyVvdGxwJScgVElNRVNFUklFUyJ9XSwiaW5pdGlhbENoYXJ0U2V0dGluZ3MiOnsiY2hhcnRUeXBlIjoiQ0hBUlRfTElORSIsImxpbWl0Ijo3NTQyLCJsaW5rZWRFbnRpdHlHdWlkIjpudWxsLCJsaW5rZWREYXNoYm9hcmRJZCI6bnVsbCwieVNjYWxlIjp7InN0YXRpYyI6ZmFsc2UsImRvbWFpbiI6W251bGwsbnVsbF19LCJ5WmVybyI6dHJ1ZX19Cg==). | ||
* See [OpenTelemetry APM UI](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/get-started/apm-monitoring/opentelemetry-apm-ui) for more information. | ||
|
||
If you can't find your entity and don't see your data with NRQL, see [OTLP Troubleshooting](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-otlp-troubleshooting). | ||
If you can't find your entity and don't see your data with NRQL, see [OTLP troubleshooting](/docs/more-integrations/open-source-telemetry-integrations/opentelemetry/best-practices/opentelemetry-otlp-troubleshooting). | ||
<InstallFeedback /> | ||
</Step> | ||
</Steps> | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jack-berg Would either of you be notified if they submitted an issue here: https://github.com/newrelic/newrelic-opentelemetry-examples/issues/new?assignees=&labels=enhancement%2C+needs-triage&projects=&template=enhancement.md&title= ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.