Commit graph

7 commits

Author SHA1 Message Date
Moritz Mack
dbf59c5414
Update/Cleanup references to old tracing.apm.* legacy settings in favor of the telemetry.* settings (#104917) 2024-01-31 09:20:05 +01:00
Stuart Tettemer
3493e425ac
Metrics: Agent settings prefix telemetry.agent preferred over tracing.apm.agent (#104345)
Prefer the telemetry.agent prefix for APM agent settings.

Add a fallback prefix to Affix settings to migrating between an old prefix
and a new prefix.
2024-01-22 12:53:36 -06:00
Przemyslaw Gomulka
0efa67821d
Rename TracerPlugin to TelemetryPlugin (#99735)
with the support of metrics the TracerPlugin name is no longer adequate. Renaming this to TelemetryPlugin.
Also introducing TelemetryProvider interface. While it is only used in Node.java at the moment to fetch Tracer instance, it is intended to be used in Plugin::createComponents (to be done in separate commit due to
the broad scope of this method)
This will allow for plugins to get access to both Tracer and Metric interfaces
without the need to add yet another argument to createComponents

Also adding internal subpackage in module/apm so that it is more obvious
which packages are not exported
2023-09-22 13:35:36 +02:00
Rory Hunter
84089fe7e4
Fixes to TRACING.md (#98169)
Just a few documentation fixes. In particularly, the Markdown references were broken.
2023-08-03 14:19:00 +01:00
Philipp Kahr
8211bbc0c4
Update tracing documentation to include better step-by-step guide (#97996)
Update tracing documentation to include a "how to get started"
2023-07-27 09:34:13 +01:00
Rory Hunter
259d2e0b1d Fix typo in TRACING.md 2022-08-08 09:28:44 +01:00
Rory Hunter
512bfebc10
Provide tracing implementation using OpenTelemetry + APM agent (#88443)
Part of #84369. Implement the `Tracer` interface by providing a
module that uses OpenTelemetry, along with Elastic's APM
agent for Java.

See the file `TRACING.md` for background on the changes and the
reasoning for some of the implementation decisions.

The configuration mechanism is the most fiddly part of this PR. The
Security Manager permissions required by the APM Java agent make
it prohibitive to start an agent from within Elasticsearch
programmatically, so it must be configured when the ES JVM starts.
That means that the startup CLI needs to assemble the required JVM
options.

To complicate matters further, the APM agent needs a secret token
in order to ship traces to the APM server. We can't use Java system
properties to configure this, since otherwise the secret will be
readable to all code in Elasticsearch. It therefore has to be
configured in a dedicated config file. This in itself is awkward,
since we don't want to leave secrets in config files. Therefore,
we pull the APM secret token from the keystore, write it to a config
file, then delete the config file after ES starts.

There's a further issue with the config file. Any options we set
in the APM agent config file cannot later be reconfigured via system
properties, so we need to make sure that only "static" configuration
goes into the config file.

I generated most of the files under `qa/apm` using an APM test
utility (I can't remember which one now, unfortunately). The goal
is to setup up a complete system so that traces can be captured in
APM server, and the results in Elasticsearch inspected.
2022-08-03 14:13:31 +01:00