Skip to content

Commit

Permalink
use shared attribute (#4594)
Browse files Browse the repository at this point in the history
(cherry picked from commit f549fed)

# Conflicts:
#	docs/en/serverless/apm-agents/apm-agents-opentelemetry-limitations.asciidoc
#	docs/en/serverless/apm-agents/apm-agents-opentelemetry.asciidoc
#	docs/en/serverless/apm/apm-ui-trace-sample-timeline.asciidoc
#	docs/en/serverless/cases/cases.asciidoc
#	docs/en/serverless/cases/manage-cases-settings.asciidoc
#	docs/en/serverless/index.asciidoc
#	docs/en/serverless/logging/log-monitoring.asciidoc
#	docs/en/serverless/observability-get-started.asciidoc
#	docs/en/serverless/projects/billing.asciidoc
#	docs/en/serverless/reference/elastic-entity-model.asciidoc
#	docs/en/serverless/synthetics/synthetics-get-started-project.asciidoc
#	docs/en/serverless/synthetics/synthetics-settings.asciidoc
#	docs/en/serverless/transclusion/apm/guide/diagrams/apm-otel-architecture.asciidoc
#	docs/en/serverless/transclusion/synthetics/global-managed-paid-for.asciidoc
#	docs/en/serverless/what-is-observability-serverless.asciidoc
  • Loading branch information
colleenmcginnis authored and mergify[bot] committed Dec 3, 2024
1 parent 299b8f1 commit d25e82f
Show file tree
Hide file tree
Showing 16 changed files with 1,795 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/en/observability/landing-page/page.asciidoc

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[[observability-apm-agents-opentelemetry-limitations]]
= Limitations

// :keywords: serverless, observability, overview

[discrete]
[[observability-apm-agents-opentelemetry-limitations-opentelemetry-traces]]
== OpenTelemetry traces

* Traces of applications using `messaging` semantics might be wrongly displayed as `transactions` in the Applications UI, while they should be considered `spans` (see issue https://github.com/elastic/apm-server/issues/7001[#7001]).
* Inability to see Stack traces in spans.
* Inability in APM views to view the "Time Spent by Span Type" (see issue https://github.com/elastic/apm-server/issues/5747[#5747]).

[discrete]
[[open-telemetry-logs-intake]]
== OpenTelemetry logs

* preview:[] The OpenTelemetry logs intake via Elastic is in technical preview.
* The application logs data stream (`app_logs`) has dynamic mapping disabled. This means the automatic detection and mapping of new fields is disabled (see issue https://github.com/elastic/apm-server/issues/9093[#9093]).

[discrete]
[[open-telemetry-otlp-limitations]]
== OpenTelemetry Line Protocol (OTLP)

Elastic supports both the
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md#otlpgrpc[(OTLP/gRPC)] and
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md#otlphttp[(OTLP/HTTP)] protocol
with ProtoBuf payload. Elastic does not yet support JSON Encoding for OTLP/HTTP.

[discrete]
[[open-telemetry-collector-exporter]]
== OpenTelemetry Collector exporter for Elastic

The https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/elasticsearchexporter#legacy-opentelemetry-collector-exporter-for-elastic[OpenTelemetry Collector exporter for Elastic]
has been deprecated and replaced by the native support of the OpenTelemetry Line Protocol in Elastic Observability (OTLP). To learn more, see https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/elasticsearchexporter#migration[migration].

The https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/elasticsearchexporter[OpenTelemetry Collector exporter for Elastic]
(which is different from the legacy exporter mentioned above) is not intended to be used with Elastic APM and {obs-serverless}. Use <<observability-apm-agents-opentelemetry-opentelemetry-native-support,Elastic's native OTLP support>> instead.
129 changes: 129 additions & 0 deletions docs/en/serverless/apm-agents/apm-agents-opentelemetry.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
[[observability-apm-agents-opentelemetry]]
= Use OpenTelemetry with APM

// :keywords: serverless, observability, overview

[NOTE]
====
For a complete overview of using OpenTelemetry with Elastic, explore https://github.com/elastic/opentelemetry[Elastic Distributions of OpenTelemetry].
====

https://opentelemetry.io/docs/concepts/what-is-opentelemetry/[OpenTelemetry] is a set of APIs, SDKs, tooling, and integrations that enable the capture and management of telemetry data from your services and applications.

Elastic integrates with OpenTelemetry, allowing you to reuse your existing instrumentation to easily send observability data to the Elastic Stack. There are several ways to integrate OpenTelemetry with the Elastic Stack:

* <<observability-apm-agents-opentelemetry-elastic-distributions-of-opentelemetry-language-sdks,Elastic Distributions of OpenTelemetry language SDKs>>
* <<observability-apm-agents-opentelemetry-upstream-opentelemetry-apisdk-elastic-apm-agent,Upstream OpenTelemetry API/SDK + Elastic APM agent>>
* <<observability-apm-agents-opentelemetry-upstream-opentelemetry-collector-and-language-sdks,Upstream OpenTelemetry Collector and language SDKs>>
* <<observability-apm-agents-opentelemetry-aws-lambda-collector-exporter,AWS Lambda collector exporter>>

[discrete]
[[observability-apm-agents-opentelemetry-elastic-distributions-of-opentelemetry-language-sdks]]
== Elastic Distributions of OpenTelemetry language SDKs

preview::[]

Elastic offers several distributions of OpenTelemetry language SDKs. A _distribution_ is a customized version of an upstream OpenTelemetry repository. Each Elastic Distribution of OpenTelemetry is a customized version of an https://opentelemetry.io/docs/languages/[OpenTelemetry language SDK].

[role="screenshot"]
image::images/apm-otel-distro.png[]

With an Elastic Distribution of OpenTelemetry language SDK you have access to all the features of the OpenTelemetry SDK that it customizes, plus:

* You may get access to SDK improvements and bug fixes contributed by the Elastic team _before_ the changes are available upstream in the OpenTelemetry repositories.
* The distribution preconfigures the collection of tracing and metrics signals, applying some opinionated defaults, such as which sources are collected by default.

// Why you wouldn't choose this method

// Just that it's still in tech preview?

// Where to go next

Get started with an Elastic Distribution of OpenTelemetry language SDK:

* https://github.com/elastic/elastic-otel-java[**Elastic Distribution of OpenTelemetry Java →**]
* preview:[] https://github.com/elastic/elastic-otel-dotnet[**Elastic Distribution of OpenTelemetry .NET →**]
* preview:[] https://github.com/elastic/elastic-otel-node[**Elastic Distribution of OpenTelemetry Node.js →**]
* preview:[] https://github.com/elastic/elastic-otel-python[**Elastic Distribution of OpenTelemetry Python →**]
* preview:[] https://github.com/elastic/elastic-otel-php[**Elastic Distribution of OpenTelemetry PHP →**]

[NOTE]
====
For more details about OpenTelemetry distributions in general, visit the https://opentelemetry.io/docs/concepts/distributions[OpenTelemetry documentation].
====

[discrete]
[[observability-apm-agents-opentelemetry-upstream-opentelemetry-apisdk-elastic-apm-agent]]
== Upstream OpenTelemetry API/SDK + Elastic APM agent

Use the OpenTelemetry API/SDKs with <<observability-apm-agents-elastic-apm-agents,Elastic APM agents>> to translate OpenTelemetry API calls to Elastic APM API calls.

[role="screenshot"]
image::images/apm-otel-api-sdk-elastic-agent.png[]

// Why you _would_ choose this method

This allows you to reuse your existing OpenTelemetry instrumentation to create Elastic APM transactions and spans — avoiding vendor lock-in and having to redo manual instrumentation.

// Why you would _not_ choose this method

However, not all features of the OpenTelemetry API are supported when using this approach, and not all Elastic APM agents support this approach.

// Where to go next

Find more details about how to use an OpenTelemetry API or SDK with an Elastic APM agent and which OpenTelemetry API features are supported in the APM agent documentation:

* https://www.elastic.co/guide/en/apm/agent/java/current/opentelemetry-bridge.html[**APM Java agent →**]
* https://www.elastic.co/guide/en/apm/agent/dotnet/current/opentelemetry-bridge.html[**APM .NET agent →**]
* https://www.elastic.co/guide/en/apm/agent/nodejs/current/opentelemetry-bridge.html[**APM Node.js agent →**]
* https://www.elastic.co/guide/en/apm/agent/python/current/opentelemetry-bridge.html[**APM Python agent →**]

[discrete]
[[observability-apm-agents-opentelemetry-upstream-opentelemetry-collector-and-language-sdks]]
== Upstream OpenTelemetry Collector and language SDKs

The Elastic Stack natively supports the OpenTelemetry protocol (OTLP). This means trace data and metrics collected from your applications and infrastructure by an OpenTelemetry Collector or OpenTelemetry language SDK can be sent to the Elastic Stack.

You can set up an https://opentelemetry.io/docs/collector/[OpenTelemetry Collector], instrument your application with an https://opentelemetry.io/docs/languages/[OpenTelemetry language SDK] that sends data to the collector, and use the collector to process and export the data to APM Server.

[role="screenshot"]
image::images/apm-otel-api-sdk-collector.png[]

[NOTE]
====
It's also possible to send data directly to APM Server from an upstream OpenTelemetry SDK. You might do this during development or if you're monitoring a small-scale application. Read more about when to use a collector in the https://opentelemetry.io/docs/collector/#when-to-use-a-collector[OpenTelemetry documentation].
====

// Why you _would_ choose this approach

This approach works well when you need to instrument a technology that Elastic doesn't provide a solution for. For example, if you want to instrument C or C{plus}{plus} you could use the https://github.com/open-telemetry/opentelemetry-cpp[OpenTelemetry C{plus}{plus} client].

// Other languages include erlang, lua, perl.

// Why you would _not_ choose this approach

However, there are some limitations when using collectors and language SDKs built and maintained by OpenTelemetry, including:

* Elastic can't provide implementation support on how to use upstream OpenTelemetry tools.
* You won't have access to Elastic enterprise APM features.
* You may experience problems with performance efficiency.

For more on the limitations associated with using upstream OpenTelemetry tools, refer to <<observability-apm-agents-opentelemetry-limitations>>.

// Where to go next

<<observability-apm-agents-opentelemetry-opentelemetry-native-support,**Get started with upstream OpenTelemetry Collectors and language SDKs →**>>

[discrete]
[[observability-apm-agents-opentelemetry-aws-lambda-collector-exporter]]
== AWS Lambda collector exporter

AWS Lambda functions can be instrumented with OpenTelemetry and monitored with {obs-serverless}.

// Do we want to say anything about why you would/wouldn't choose this method to send data to Elastic?

// Where to go next

To get started, follow the official AWS Distro for OpenTelemetry Lambda documentation, and configure the OpenTelemetry Collector to output traces and metrics to your Elastic cluster:

https://aws-otel.github.io/docs/getting-started/lambda[**Get started with the AWS Distro for OpenTelemetry Lambda**^]
80 changes: 80 additions & 0 deletions docs/en/serverless/apm/apm-ui-trace-sample-timeline.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[[observability-apm-trace-sample-timeline]]
= Trace sample timeline

// :keywords: serverless, observability, reference

The trace sample timeline visualization is a high-level view of what your application was doing while it was trying to respond to a request.
This makes it useful for visualizing where a selected transaction spent most of its time.

[role="screenshot"]
image::images/transactions/apm-transaction-sample.png[Example view of transactions sample]

View a span in detail by clicking on it in the timeline waterfall.
For example, when you click on an SQL Select database query,
the information displayed includes the actual SQL that was executed, how long it took,
and the percentage of the trace's total time.
You also get a stack trace, which shows the SQL query in your code.
Finally, APM knows which files are your code and which are just modules or libraries that you've installed.
These library frames will be minimized by default in order to show you the most relevant stack trace.

[TIP]
====
A {apm-guide-ref}/data-model-spans.html[span] is the duration of a single event.
Spans are automatically captured by APM agents, and you can also define custom spans.
Each span has a type and is defined by a different color in the timeline/waterfall visualization.
====

[role="screenshot"]
image::images/spans/apm-span-detail.png[Example view of a span detail in the Applications UI]

[discrete]
[[observability-apm-trace-sample-timeline-investigate]]
== Investigate

The trace sample timeline features an **Investigate** button which provides a quick way to jump
to other areas of the {obs-serverless} UI while maintaining the context of the currently selected trace sample.
For example, quickly view:

* logs and metrics for the selected pod
* logs and metrics for the selected host
* trace logs for the selected `trace.id`
* uptime status of the selected domain
* the <<observability-apm-service-map,service map>> filtered by the selected trace
* the selected transaction in **Discover**
* your <<observability-apm-create-custom-links,custom links>>

[discrete]
[[observability-apm-trace-sample-timeline-distributed-tracing]]
== Distributed tracing

When a trace travels through multiple services it is known as a _distributed trace_.
In the Applications UI, the colors in a distributed trace represent different services and
are listed in the order they occur.

[role="screenshot"]
image::images/spans/apm-services-trace.png[Example of distributed trace colors in the Applications UI]

As application architectures are shifting from monolithic to more distributed, service-based architectures,
distributed tracing has become a crucial feature of modern application performance monitoring.
It allows you to trace requests through your service architecture automatically, and visualize those traces in one single view in the Applications UI.
From initial web requests to your front-end service, to queries made to your back-end services,
this makes finding possible bottlenecks throughout your application much easier and faster.

[role="screenshot"]
image::images/spans/apm-distributed-tracing.png[Example view of the distributed tracing in the Applications UI]

Don't forget; by definition, a distributed trace includes more than one transaction.
When viewing distributed traces in the timeline waterfall,
you'll see this icon: image:images/icons/merge.svg[Merge],
which indicates the next transaction in the trace.
For easier problem isolation, transactions can be collapsed in the waterfall by clicking
the icon to the left of the transactions.
Transactions can also be expanded and viewed in detail by clicking on them.

After exploring these traces,
you can return to the full trace by clicking **View full trace**.

[TIP]
====
Distributed tracing is supported by all APM agents, and there's no additional configuration needed.
====
16 changes: 16 additions & 0 deletions docs/en/serverless/cases/cases.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[[observability-cases]]
= Cases

// :description: Use cases to track progress toward solving problems detected in {obs-serverless}.
// :keywords: serverless, observability, overview

Collect and share information about observability issues by creating a case.
Cases allow you to track key investigation details,
add assignees and tags to your cases, set their severity and status, and add alerts,
comments, and visualizations. You can also send cases to third-party systems by
<<observability-case-settings,configuring external connectors>>.

[role="screenshot"]
image::images/cases.png[Cases page]

// NOTE: This is an autogenerated screenshot. Do not edit it directly.
Loading

0 comments on commit d25e82f

Please sign in to comment.