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

Add content to APM User guide #6378

Merged
merged 25 commits into from
Oct 29, 2021
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
feff77a
docs: add sourcemap upload guide
bmorelli25 Oct 15, 2021
a41b639
docs: add placeholder ILM topic
bmorelli25 Oct 15, 2021
b704a80
docs: add manage storage
bmorelli25 Oct 15, 2021
21e5625
docs: add pipeline and es tuning docs
bmorelli25 Oct 18, 2021
b07054e
docs: add jaeger
bmorelli25 Oct 18, 2021
3b3f229
docs: fixes
bmorelli25 Oct 18, 2021
5517e09
docs: move input settings
bmorelli25 Oct 18, 2021
4bc3c5b
Merge branch 'master' of github.com:elastic/apm-server into add-more-…
bmorelli25 Oct 18, 2021
a1999e3
docs: fix doc build
bmorelli25 Oct 18, 2021
6d74877
docs: add upgrade page for broken links
bmorelli25 Oct 19, 2021
f83246e
docs: clean it up
bmorelli25 Oct 20, 2021
baa7237
Merge branch 'master' of github.com:elastic/apm-server into add-more-…
bmorelli25 Oct 20, 2021
b1d4b78
docs: update more jaeger
bmorelli25 Oct 20, 2021
be00f22
docs: update input settings for 7.16
bmorelli25 Oct 25, 2021
ea0cfe1
docs: update config instructions
bmorelli25 Oct 25, 2021
282c6d8
Merge branch 'master' of github.com:elastic/apm-server into add-more-…
bmorelli25 Oct 25, 2021
6f9b385
Merge branch 'master' into add-more-content
bmorelli25 Oct 26, 2021
6dab17c
Merge branch 'master' of github.com:elastic/apm-server into add-more-…
bmorelli25 Oct 27, 2021
aae58d8
docs: fix merge conflict
bmorelli25 Oct 27, 2021
31b51fc
docs: move legacy tab widgets to legacy folder
bmorelli25 Oct 27, 2021
4283eef
docs: fix cross-doc includes
bmorelli25 Oct 27, 2021
e210291
forgot the 's'
bmorelli25 Oct 27, 2021
e752a59
docs: fix cross-doc includes
bmorelli25 Oct 27, 2021
469f031
Merge branch 'master' of github.com:elastic/apm-server into add-more-…
bmorelli25 Oct 29, 2021
a9f7eb3
docs: feedback
bmorelli25 Oct 29, 2021
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
4 changes: 0 additions & 4 deletions docs/apm-package/apm-integration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,9 @@ In the future, we may align with Elastic Stack versioning.
[[apm-integration-learn-more]]
=== Learn more

// to do: update these links
* <<input-apm>>
* <<apm-integration-data-streams>>
* {fleet-guide}/fleet-overview.html[Fleet overview]

include::./data-streams.asciidoc[]

include::./input-apm.asciidoc[]

include::./configure.asciidoc[]
11 changes: 11 additions & 0 deletions docs/apm-quick-start.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[[apm-quick-start]]
== Quick start

// to do: Include quick start file from obs-docs repo

// Considerations:

// * Point to EA APT/YUM
// * Point to EA for running on Docker
// * Point to EA for directory layout
// * Point to EA for systemd
22 changes: 22 additions & 0 deletions docs/apm-tune-elasticsearch.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[[apm-tune-elasticsearch]]
=== Tune {es} for data ingestion

++++
<titleabbrev>Tune {es}</titleabbrev>
++++

The {es} Reference provides insight on tuning {es}.

{ref}/tune-for-indexing-speed.html[Tune for indexing speed] provides information on:

* Refresh interval
* Disabling swapping
* Optimizing filesystem cache
* Considerations regarding faster hardware
* Setting the indexing buffer size

{ref}/tune-for-disk-usage.html[Tune for disk usage] provides information on:

* Disabling unneeded features
* Shard size
* Shrink index
4 changes: 4 additions & 0 deletions docs/data-streams.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[apm-data-streams]]
== Data streams

// to do: fill with content. placeholder for external links for now
23 changes: 23 additions & 0 deletions docs/how-to.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[[how-to-guides]]
== How-to guides

Learn how to perform common APM configuration and management tasks.

* <<source-map-how-to>>
* <<ilm-how-to>>
* <<jaeger-integration>>
* <<ingest-pipelines>>
* <<manage-storage>>
* <<apm-tune-elasticsearch>>

include::./source-map-how-to.asciidoc[]

include::./ilm-how-to.asciidoc[]

include::./jaeger-integration.asciidoc[]

include::./ingest-pipelines.asciidoc[]

include::./manage-storage.asciidoc[]

include::./apm-tune-elasticsearch.asciidoc[]
18 changes: 18 additions & 0 deletions docs/ilm-how-to.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[[ilm-how-to]]
=== Index lifecycle management (ILM)

// todo: add more context and an example

++++
<titleabbrev>Customize index lifecycle management</titleabbrev>
++++

The index lifecycle management (ILM) feature in {es} allows you to automate the
lifecycle of your APM Server indices as they grow and age.
ILM is enabled by default, and a default policy is applied to all APM indices.

To view and edit these index lifecycle policies in {kib},
select *Stack Management* / *Index Lifecycle Management*.
Search for `apm`.

See {ref}/getting-started-index-lifecycle-management.html[manage the index lifecycle] for more information.
bmorelli25 marked this conversation as resolved.
Show resolved Hide resolved
21 changes: 21 additions & 0 deletions docs/ingest-pipelines.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[[ingest-pipelines]]
=== Parse data using ingest pipelines

The APM integration loads default ingest node pipelines into {es}.
These pipelines preprocess and enrich APM documents before indexing them.
For example, a pipeline might define one processor that removes a field, and another that renames a field.

Pipelines can be used to ensure data security by removing or obfuscating sensitive information.
See <<apm-data-security,data security>> for an example.

[float]
[[view-edit-default-pipelines]]
=== View or edit a default pipeline

To view or edit a default pipelines in {kib},
Copy link
Member

Choose a reason for hiding this comment

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

Re "edit", we should make sure to document that the Fleet-managed ingest policy will be overwritten on reinstall/upgrade. Users can define their own custom ingest pipeline if needed, but they need make sure that they also call the package-provided pipeline.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me know if I'm understanding this correctly:

  1. Fleet adds ingest pipelines for the APM integration using index templates that include pipeline index settings.
  2. Elasticsearch uses the index pattern in these index templates to match pipelines to APM data streams.

As an example, the index template traces-apm, matches traces-apm-* data streams and assigns the "traces-apm-7.16.0" pipeline:

Screen Shot 2021-10-29 at 1 15 07 PM

  1. This, Fleet managed, index template ⬆️ will be overwritten on reinstall/upgrade.

Assuming the above is correct, then I see three scenarios:

  1. If a user edits the Fleet managed index template to point to a new pipeline, they need to:
    a. ensure the package-provided pipeline is also called
    b. know that the index template will be overwritten on install/upgrade

  2. If a user creates a custom component template with a higher priority that points to a new pipeline, they need to:
    a. ensure the package-provided pipeline is also called
    b. not sure what happens on upgrade here

  3. If a user edits the pipeline directly, like the "traces-apm-7.16.0" pipeline, they need to:
    a. ensure the package-provided pipelines are still included
    b. know that their edits will be overwritten on install/upgrade

Copy link
Member

Choose a reason for hiding this comment

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

I had thought that the default pipeline was defined in the @settings component template, which would allow it to be overridden. That is not the case, so #2 isn't possible actually. I believe at the moment users would be limited to #1 and #3. We'll need to improve this. CC @simitt

Users shouldn't need to care about upgrades, but rather they should have some way of hooking their own custom pipeline into a predefined location in the Fleet-managed ingest pipeline.

Copy link
Member Author

Choose a reason for hiding this comment

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

Perfect. Thanks, Andrew!

Copy link
Contributor

Choose a reason for hiding this comment

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

started elastic/package-spec#129 a while back; @ruflin do you have any concerns when moving the default_pipeline to the component-template instead of the index-template to make it user overridable?

select *Stack Management* / *Index Node Pipelines*.
Search for `apm`.

See {ref}/ingest.html[ingest node pipelines] for more information.

// to do: add more information including an example
File renamed without changes.
16 changes: 13 additions & 3 deletions docs/integrations-index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,32 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
[[apm-user-guide]]
= APM User Guide

IMPORTANT: You are looking at preliminary documentation for a future release. For current documentation, see the
https://www.elastic.co/guide/en/apm/get-started/current/index.html[APM Overview] or
https://www.elastic.co/guide/en/apm/server/current/index.html[APM Server Reference].

include::apm-overview.asciidoc[]

include::apm-components.asciidoc[]

== Quick start

Include quick start file from obs-docs repo
include::apm-quick-start.asciidoc[]

include::data-model.asciidoc[]

include::features.asciidoc[]

include::how-to.asciidoc[]

include::input-apm.asciidoc[]

include::data-streams.asciidoc[]

include::troubleshoot-apm.asciidoc[]

include::apm-breaking.asciidoc[]

include::upgrade.asciidoc[]

// This includes the legacy APM Overview
include::legacy/guide/index.asciidoc[]

Expand Down
112 changes: 112 additions & 0 deletions docs/jaeger-integration.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
[[jaeger-integration]]
=== Jaeger integration

++++
<titleabbrev>Integrate with Jaeger</titleabbrev>
++++

Elastic APM integrates with https://www.jaegertracing.io/[Jaeger], an open-source, distributed tracing system.
This integration allows users with an existing Jaeger setup to switch from the default Jaeger backend,
to the Elastic Stack.
Best of all, no instrumentation changes are needed in your application code.

[float]
[[jaeger-architecture]]
=== Supported architecture

Jaeger architecture supports different data formats and transport protocols
that define how data can be sent to a collector. Elastic APM, as a Jaeger collector,
supports communication with *Jaeger agents* via gRPC.

* The APM integration serves Jaeger gRPC over the same host and port as the Elastic APM agent protocol.

* The APM integration gRPC endpoint supports TLS. If SSL is configured,
SSL settings will automatically be applied to the APM integration's Jaeger gRPC endpoint.

* The gRPC endpoint supports probabilistic sampling.
Sampling decisions can be configured <<configure-sampling-central-jaeger,centrally>> with APM Agent central configuration, or <<configure-sampling-local-jaeger,locally>> in each Jaeger client.

See the https://www.jaegertracing.io/docs/1.22/architecture[Jaeger docs]
for more information on Jaeger architecture.

[float]
[[get-started-jaeger]]
=== Get started

Connect your preexisting Jaeger setup to Elastic APM in three steps:

* <<configure-agent-client-jaeger>>
* <<configure-sampling-jaeger>>
* <<configure-start-jaeger>>

IMPORTANT: There are <<caveats-jaeger,caveats>> to this integration.

[float]
[[configure-agent-client-jaeger]]
==== Configure Jaeger agents

The APM integration serves Jaeger gRPC over the same host and port as the Elastic APM agent protocol.

include::./shared/jaeger/jaeger-widget.asciidoc[]

[float]
[[configure-sampling-jaeger]]
==== Configure Sampling

The APM integration supports probabilistic sampling, which can be used to reduce the amount of data that your agents collect and send.
Probabilistic sampling makes a random sampling decision based on the configured sampling value.
For example, a value of `.2` means that 20% of traces will be sampled.

There are two different ways to configure the sampling rate of your Jaeger agents:

* <<jaeger-configure-sampling-central,APM Agent central configuration (default)>>
* <<jaeger-configure-sampling-local,Local sampling in each Jaeger client>>

[float]
[[configure-sampling-central-jaeger]]
===== APM Agent central configuration (default)

Central sampling, with APM Agent central configuration,
allows Jaeger clients to poll APM Server for the sampling rate.
This means sample rates can be configured on the fly, on a per-service and per-environment basis.
See {kibana-ref}/agent-configuration.html[Central configuration] to learn more.

[float]
[[configure-sampling-local-jaeger]]
===== Local sampling in each Jaeger client

If you don't have access to the APM app,
you'll need to change the Jaeger client's `sampler.type` and `sampler.param`.
This enables you to set the sampling configuration locally in each Jaeger client.
See the official https://www.jaegertracing.io/docs/1.22/sampling/[Jaeger sampling documentation]
for more information.

[float]
[[configure-start-jaeger]]
==== Start sending data

That's it! Data sent from Jaeger clients to the APM Server can now be viewed in the APM app.

[float]
[[caveats-jaeger]]
=== Caveats

There are some limitations and differences between Elastic APM and Jaeger that you should be aware of.

*Jaeger integration limitations:*

* Because Jaeger has its own trace context header, and does not currently support W3C trace context headers,
it is not possible to mix and match the use of Elastic's APM agents and Jaeger's clients.
* Elastic APM only supports probabilistic sampling.

*Differences between APM Agents and Jaeger Clients:*

* Jaeger clients only sends trace data.
APM agents support a larger number of features, like
multiple types of metrics, and application breakdown charts.
When using Jaeger, features like this will not be available in the APM app.
* Elastic APM's {apm-overview-ref-v}/apm-data-model.html[data model] is different than Jaegers.
For Jaeger trace data to work with Elastic's data model, we rely on spans being tagged with the appropriate
https://github.com/opentracing/specification/blob/master/semantic_conventions.md[`span.kind`].
** Server Jaeger spans are mapped to Elastic APM {apm-overview-ref-v}/transactions.html[transactions].
** Client Jaeger spans are mapped to Elastic APM {apm-overview-ref-v}/transaction-spans.html[spans] -- unless the span is the root, in which case it is mapped to an Elastic APM {apm-overview-ref-v}/transactions.html[transaction].
Loading