diff --git a/docs/apm-agents-android-api.mdx b/docs/apm-agents-android-api.mdx
new file mode 100644
index 0000000000..90d53fc165
--- /dev/null
+++ b/docs/apm-agents-android-api.mdx
@@ -0,0 +1,9 @@
+---
+id: serverlessObservabilityApmAgentsAndroidApi
+slug: /serverless/observability/apm-agents-android-api
+title: API
+# description: Description to be written
+tags: [ 'serverless', 'observability', 'overview' ]
+---
+
+No source content found.
diff --git a/docs/apm-agents-android-configure.mdx b/docs/apm-agents-android-configure.mdx
new file mode 100644
index 0000000000..c88235eaca
--- /dev/null
+++ b/docs/apm-agents-android-configure.mdx
@@ -0,0 +1,303 @@
+---
+id: serverlessObservabilityApmAgentsAndroidConfigure
+slug: /serverless/observability/apm-agents-android-configure
+title: Configure
+# description: Description to be written
+tags: [ 'serverless', 'observability', 'reference' ]
+---
+
+
+
+
+## Gradle configuration
+
+Configure your application at compile time within your application's `build.gradle` file:
+
+```groovy
+// Android app's build.gradle file
+plugins {
+ //...
+ id "co.elastic.apm.android" version "[latest_version]" [^1]
+}
+
+elasticApm {
+ // Minimal configuration
+ serverUrl = "https://your.elastic.server"
+
+ // Optional
+ serviceName = "your app name" [^2]
+ serviceVersion = "0.0.0" [^3]
+ apiKey = "your server api key" [^4]
+ secretToken = "your server auth token" [^5]
+}
+```
+[^1]: You can find the latest version in the [Gradle plugin portal](https://plugins.gradle.org/plugin/co.elastic.apm.android).
+[^2]: Defaults to your `android.defaultConfig.applicationId` value.
+[^3]: Defaults to your `android.defaultConfig.versionName` value.
+[^4]: Defaults to null.
+More info on API Keys [here](((ref))/security-api-create-api-key.html).
+[^5]: Defaults to null.
+
+
+When both `secretToken` and `apiKey` are provided, apiKey has priority and secretToken is ignored.
+
+
+All of the values provided in the Gradle configuration can be overridden with the following environment variables:
+
+| Config | Associated Environment variable |
+|---|---|
+| serviceName | `ELASTIC_APM_SERVICE_NAME` |
+| serviceVersion | `ELASTIC_APM_SERVICE_VERSION` |
+| serverUrl | `ELASTIC_APM_SERVER_URL` |
+| apiKey | `ELASTIC_APM_API_KEY` |
+| secretToken | `ELASTIC_APM_SECRET_TOKEN` |
+
+## Runtime configuration
+
+The runtime configuration is provided within your [Application](https://developer.android.com/reference/android/app/Application) class when initializing the Elastic agent.
+This configuration overrides any previously-set compile time configuration.
+
+Runtime configuration works by providing your own instance of the `ElasticApmConfiguration` class as shown below:
+
+```java
+// Application class
+
+class MyApp extends android.app.Application {
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ ElasticApmAgent.initialize(this, ElasticApmConfiguration.builder().build());
+ }
+}
+```
+
+
+
+### APM Server connectivity
+
+The APM Server connectivity parameters can be provided at compile time, either by using the Gradle DSL configuration or by providing the APM Server connectivity-related environment variables as mentioned above.
+Later on, when the app is running, the connectivity parameters can be overridden by providing a custom `Connectivity` instance when initializing the Elastic agent.
+
+Once you've created your `Connectivity` instance, you can set it into the agent's initialization as show below:
+
+```java
+class MyApp extends android.app.Application {
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ Connectivity myCustomConnectivity = Connectivity.simple(/*params*/);
+ ElasticApmAgent.initialize(this, myCustomConnectivity);
+
+ // Optionally if you also define a custom configuration:
+ // ElasticApmAgent.initialize(this, ElasticApmConfiguration.builder().build(), myCustomConnectivity);
+ }
+}
+```
+
+
+
+### Application ID configuration
+
+You can provide your application name, version, and environment dynamically when building your `ElasticApmConfiguration` instance as shown below:
+
+```java
+class MyApp extends android.app.Application {
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ ElasticApmConfiguration configuration = ElasticApmConfiguration.builder()
+ .setServiceName("my-custom-name")
+ .setServiceVersion("1.0.0")
+ .setDeploymentEnvironment("debug")
+ .build();
+ ElasticApmAgent.initialize(this, configuration);
+ }
+}
+```
+
+### Signal filtering
+
+You can provide your own filters to specify which spans, logs, and metrics are allowed to be exported to the backend.
+With this tool, you could essentially turn some of these signals (or all) on and off at runtime depending on your own business logic.
+
+In order to do so, you need to provide your own filters for each signal in the agent configuration as shown below:
+
+```java
+class MyApp extends android.app.Application {
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ ElasticApmConfiguration configuration = ElasticApmConfiguration.builder()
+ .addLogFilter(new LogFilter(){/*...*/})
+ .addMetricFilter(new MetricFilter(){/*...*/})
+// .addMetricFilter(new MetricFilter(){/*...*/}) You can add multiple filters per signal.
+ .addSpanFilter(new SpanFilter() {
+ @Override
+ public boolean shouldInclude(ReadableSpan readableSpan) {
+ if (thisSpanIsAllowedToContinue(readableSpan)) {
+ return true;
+ }
+ return false;
+ }
+ })
+ .build();
+ ElasticApmAgent.initialize(this, configuration);
+ }
+}
+```
+
+Each filter will contain a `shouldInclude` function which provides the signal item to be evaluated.
+This function must return a boolean value--`true` when the provided item is allowed to continue or `false` when it must be discarded.
+
+You can add multiple filters per signal which will be iterated over (in the order they were added) until all the filters are checked or until one of them decides to discard the signal item provided.
+
+### Automatic instrumentation enabling/disabling
+
+The agent provides automatic instrumentation for its Supported technologies which are all enabled by default.
+You can choose which ones to keep enabled, as well as and disabling those you don't need, at runtime, like so:
+
+```java
+class MyApp extends android.app.Application {
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+
+ // When building an InstrumentationConfiguration object using `InstrumentationConfiguration.builder()`
+ // all of the instrumentations are disabled by default, so you only need to enable the ones you need.
+ InstrumentationConfiguration instrumentations = InstrumentationConfiguration.builder()
+ .enableHttpTracing(true)
+ .build();
+ ElasticApmConfiguration configuration = ElasticApmConfiguration.builder()
+ .setInstrumentationConfiguration(instrumentations)
+ .build();
+ ElasticApmAgent.initialize(this, configuration);
+ }
+}
+```
+
+
+When building an InstrumentationConfiguration object using `InstrumentationConfiguration.builder()`, all instrumentations are disabled by default.
+Only enable the instrumentations you need using the builder setter methods.
+
+
+### HTTP Configuration
+
+The agent provides a configuration object for HTTP-related spans named `HttpTraceConfiguration`.
+You can pass an instance of it to the `ElasticApmConfiguration` object when initializing the agent in order to customize how the HTTP spans should be handled.
+
+#### Filtering HTTP requests from getting traced
+
+By default, all of your app's HTTP requests will get traced.
+You can avoid some requests from getting traced by creating your own `HttpExclusionRule`.
+For example, this is an exclusion rule that prevents all requests with the host `127.0.0.1` from getting traced:
+
+```java
+class MyHttpExclusionRule extends HttpExclusionRule {
+
+ @Override
+ public boolean exclude(HttpRequest request) {
+ return request.url.getHost().equals("127.0.0.1");
+ }
+}
+```
+
+Then you'd need to add it to Elastic's Agent config through its `HttpTraceConfiguration`, like so:
+
+```java
+class MyApp extends android.app.Application {
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ HttpTraceConfiguration httpConfig = HttpTraceConfiguration.builder()
+ .addExclusionRule(new MyHttpExclusionRule())
+ .build();
+ ElasticApmConfiguration configuration = ElasticApmConfiguration.builder()
+ .setHttpTraceConfiguration(httpConfig)
+ .build();
+ ElasticApmAgent.initialize(this, configuration);
+ }
+}
+```
+
+#### Adding extra attributes to your HTTP requests' spans
+
+If the HTTP span attributes [provided by default](https://github.com/elastic/apm/tree/main/specs/agents/mobile) aren't enough, you can attach your own `HttpAttributesVisitor` to add extra params to each HTTP request being traced.
+For example:
+
+```java
+class MyHttpAttributesVisitor implements HttpAttributesVisitor {
+
+ public void visit(AttributesBuilder attrsBuilder, HttpRequest request) {
+ attrsBuilder.put("my_custom_attr_key", "my_custom_attr_value");
+ }
+}
+```
+
+Then you'd need to add it to Elastic's Agent config through its `HttpTraceConfiguration`, like so:
+
+```java
+class MyApp extends android.app.Application {
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ HttpTraceConfiguration httpConfig = HttpTraceConfiguration.builder()
+ .addHttpAttributesVisitor(new MyHttpAttributesVisitor())
+ .build();
+ ElasticApmConfiguration configuration = ElasticApmConfiguration.builder()
+ .setHttpTraceConfiguration(httpConfig)
+ .build();
+ ElasticApmAgent.initialize(this, configuration);
+ }
+}
+```
+
+### Trace spans attributes notes
+
+There are [common attributes](https://github.com/elastic/apm/tree/main/specs/agents/mobile) that the Elastic APM agent gathers for every Span.
+However, due to the nature of Android's OS, to collect some device-related data some of the above-mentioned resources require the Host app (your app) to have specific runtime permissions granted.
+If the corresponding permissions aren't granted, then the device data won't be collected, and nothing will be sent for those attributes.
+This table outlines the attributes and their corresponding permissions:
+
+| Attribute | Used in | Requires permission |
+|---|---|---|
+| `net.host.connection.subtype` | All Spans | [READ_PHONE_STATE](https://developer.android.com/reference/android/Manifest.permission#READ_PHONE_STATE) |
+
+### Advanced configurable options
+
+The configurable parameters provided by the Elastic APM agent aim to help configuring common use cases in an easy way, in most of the cases it means to act as a facade between your application and the OpenTelemetry Java SDK that this agent is built on top.
+If your project requires to configure more advanced aspects of the overall APM processes, you could directly apply that configuration using the [OpenTelemetry SDK](https://opentelemetry.io/docs/instrumentation/java/getting-started/), which becomes available for you to use within your project by adding the Elastic agent plugin, as explained in the agent setup guide.
+Said configuration will be used by the Elastic agent for the [signals](https://opentelemetry.io/docs/concepts/signals/) it sends out of the box.
+
+
+
+## Dynamic configuration Dynamic
+
+Configuration options marked with Dynamic true can be changed at runtime when set from Kibana's [central configuration](((kibana-ref))/agent-configuration.html).
+
+## Option reference
+
+This is a list of all configuration options.
+
+
+
+### `recording` (0.4.0)
+
+A boolean specifying if the agent should be recording or not.
+When recording, the agent instruments incoming HTTP requests, tracks errors and collects and sends metrics.
+When not recording, the agent works as a noop, not collecting data and not communicating with the APM sever, except for polling the central configuration endpoint.
+As this is a reversible switch, agent threads are not being killed when inactivated, but they will be mostly idle in this state, so the overhead should be negligible.
+
+You can use this setting to dynamically disable Elastic APM at runtime.
+
+Dynamic
+
+| Default | Type | Dynamic |
+|---|---|---|
+| `true` | Boolean | true |
\ No newline at end of file
diff --git a/docs/apm-agents-android-get-started.mdx b/docs/apm-agents-android-get-started.mdx
new file mode 100644
index 0000000000..e36c4bd719
--- /dev/null
+++ b/docs/apm-agents-android-get-started.mdx
@@ -0,0 +1,130 @@
+---
+id: serverlessObservabilityApmAgentsAndroidGetStarted
+slug: /serverless/observability/apm-agents-android-get-started
+title: Get started
+# description: Description to be written
+tags: [ 'serverless', 'observability', 'reference' ]
+---
+
+
+
+
+Follow these steps to start reporting your Android application's performance to Elastic APM:
+
+1. Set up Gradle.
+1. Set up your application.
+1. Compile and run.
+1. (Optional) Manual set up.
+1. What's next?.
+
+
+
+## Set up Gradle
+
+First, add the [Elastic APM agent plugin](https://plugins.gradle.org/plugin/co.elastic.apm.android) to your application's `build.gradle` file as shown below:
+
+```groovy
+// Android app's build.gradle file
+plugins {
+ id "com.android.application"
+ id "co.elastic.apm.android" version "[latest_version]" [^1]
+}
+```
+[^1]: The Elastic plugin declaration must be added below the Android app plugin declaration (`com.android.application`) and below the Kotlin plugin declaration (if used).
+
+After adding the agent plugin, configure it.
+A minimal configuration sets the Elastic APM Server endpoint as shown below:
+
+```groovy
+// Android app's build.gradle file
+plugins {
+ //...
+ id "co.elastic.apm.android" version "[latest_version]" [^1]
+}
+
+elasticApm {
+ // Minimal configuration
+ serverUrl = "https://your.elastic.server"
+
+ // Optional
+ serviceName = "your app name" [^2]
+ serviceVersion = "0.0.0" [^3]
+ apiKey = "your server api key" [^4]
+ secretToken = "your server auth token" [^5]
+}
+```
+[^1]: You can find the latest version in the [Gradle plugin portal](https://plugins.gradle.org/plugin/co.elastic.apm.android).
+[^2]: Defaults to your `android.defaultConfig.applicationId` value.
+[^3]: Defaults to your `android.defaultConfig.versionName` value.
+[^4]: Defaults to null.
+More info on API Keys [here](((ref))/security-api-create-api-key.html).
+[^5]: Defaults to null.
+
+
+When both `secretToken` and `apiKey` are provided, apiKey has priority and secretToken is ignored.
+
+
+
+
+### For projects using minSdk version < 26
+
+Due to Android's limited support for Java 8 features on devices with API level < 26, or in other words, older than Android 8.0, you must add [Java 8+ desugaring support](https://developer.android.com/studio/write/java8-support#library-desugaring) to apps with a minSdk version lower than 26.
+If you don't, your app can crash when running on devices using Android OS versions older than 8.0. This is because the [OpenTelemetry Java SDK](https://github.com/open-telemetry/opentelemetry-java), which this SDK is built upon, uses Java 8 features.
+
+If your minSdk is 26 or higher, you can skip this step.
+
+
+
+## Set up your application
+
+After syncing your project with the Gradle changes above, the Elastic APM agent needs to be initialized within your [Application class](https://developer.android.com/reference/android/app/Application).
+This example shows the simplest way to configure the agent:
+
+```java
+// Your Application class
+
+class MyApp extends android.app.Application {
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ ElasticApmAgent.initialize(this); [^1]
+ }
+}
+```
+[^1]: Initialize the Elastic APM agent once.
+
+
+
+## Compile and run
+
+All that's left is to compile and run your application.
+That's it!
+
+
+
+## (Optional) Manual set up
+
+If you need to set up the Elastic SDK manually, without having to add the Gradle plugin as shown above, you'll need to provide the following configuration parameters at runtime:
+
+- Set your app name, version, and environment name, as explained here.
+- Set your server connectivity parameters, as explained here.
+
+
+Without the Gradle plugin, the Elastic SDK won't be able to provide automatic instrumentations for its Supported technologies.
+
+
+
+
+## What's next?
+
+After initializing the agent (by using the gradle plugin), your application will automatically create traces for all OkHttp network requests (including those created by tools that make use of OkHttp, like Retrofit) and all [Activity](https://developer.android.com/reference/android/app/Activity) and [Fragment](https://developer.android.com/reference/androidx/fragment/app/Fragment) starting methods.
+
+Apart from the automatic instrumentation helped by the Gradle plugin, you'll get automatic crash reports when an unexpected error occurs in your app, regardless of whether the Gradle plugin is available or not.
+
+All of these events will contain a "Session ID" that links related events together—allowing you to make sense of and diagnose any issues that arise.
+Head to the **APM app in ((kib))** to start exploring your data.
+
+If you need to customize the Elastic APM agent to your project's needs, see configuration.
+If you need to create your own custom transactions, see {/* manual instrumentation */}.
+
diff --git a/docs/apm-agents-android-install.mdx b/docs/apm-agents-android-install.mdx
new file mode 100644
index 0000000000..fd59a0d045
--- /dev/null
+++ b/docs/apm-agents-android-install.mdx
@@ -0,0 +1,9 @@
+---
+id: serverlessObservabilityApmAgentsAndroidInstall
+slug: /serverless/observability/apm-agents-android-install
+title: Install
+# description: Description to be written
+tags: [ 'serverless', 'observability', 'reference' ]
+---
+
+No source content found.
diff --git a/docs/apm-agents-android-performance-tuning.mdx b/docs/apm-agents-android-performance-tuning.mdx
new file mode 100644
index 0000000000..4b1937d233
--- /dev/null
+++ b/docs/apm-agents-android-performance-tuning.mdx
@@ -0,0 +1,9 @@
+---
+id: serverlessObservabilityApmAgentsAndroidPerformanceTuning
+slug: /serverless/observability/apm-agents-android-performance-tuning
+title: Performance tuning
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+No source content found.
diff --git a/docs/apm-agents-android-supported-technologies.mdx b/docs/apm-agents-android-supported-technologies.mdx
new file mode 100644
index 0000000000..b47a05041a
--- /dev/null
+++ b/docs/apm-agents-android-supported-technologies.mdx
@@ -0,0 +1,75 @@
+---
+id: serverlessObservabilityApmAgentsAndroidSupportedTechnologies
+slug: /serverless/observability/apm-agents-android-supported-technologies
+title: Supported technologies
+# description: Description to be written
+tags: [ 'serverless', 'observability', 'how-to' ]
+---
+
+
+
+
+The Elastic APM Android agent is built on top of the [OpenTelemetry Java SDK](https://opentelemetry.io) -- extending its functionality while also automatically instrumenting various APIs and frameworks.
+This section lists all supported technologies.
+
+* Android Gradle Plugin versions
+* Android runtime versions
+* Languages
+* UI frameworks
+* Networking frameworks
+
+
+
+## Android Gradle Plugin versions
+
+| |
+|---|
+| Supported versions |
+| >= 7.2.0 |
+
+
+
+## Android runtime versions
+
+| |
+|---|
+| Supported versions |
+| API >= 24 |
+
+
+If your minSdk version is lower than 26, then you must add [Java 8+ desugaring support](https://developer.android.com/studio/write/java8-support#library-desugaring) to your application.
+
+
+
+
+## Languages
+
+The Java version is for the supported JDK, which is aligned with the JDK version supported by the Android Gradle plugin.
+The Kotlin version refers to the Kotlin gradle plugin versions, also aligned with the versions supported by the Android Gradle plugin.
+
+| Language | Supported versions |
+|---|---|
+| Java | 11 |
+| Kotlin | 1.5+ |
+
+
+
+## UI frameworks
+
+| Class | Notes | Since |
+|---|---|---|
+| [Activity](https://developer.android.com/reference/android/app/Activity) | Comes from the Android SDK | 0.1.0 |
+| [Fragment](https://developer.android.com/reference/androidx/fragment/app/Fragment.html) | Comes from the [Android Jetpack tools](https://developer.android.com/jetpack) | 0.1.0 |
+
+
+
+## Networking frameworks
+
+Distributed tracing will only work if you are using one of the supported networking frameworks.
+
+For the supported HTTP libraries, the agent automatically creates spans for outgoing HTTP requests and propagates tracing headers.
+The spans are named after the schema ``, for example `GET elastic.co`.
+
+| Framework | Supported versions | Note | Since |
+|---|---|---|---|
+| OkHttp | 3.11+ | OkHttp-managed threads and Kotlin coroutine related calls are automatically traced. Calls from tools using OkHttp (such as Retrofit) are automatically traced as well. | 0.1.0 |
\ No newline at end of file
diff --git a/docs/apm-agents-android.mdx b/docs/apm-agents-android.mdx
new file mode 100644
index 0000000000..79f4ca7c60
--- /dev/null
+++ b/docs/apm-agents-android.mdx
@@ -0,0 +1,37 @@
+---
+id: serverlessObservabilityApmAgentsAndroid
+slug: /serverless/observability/apm-agents-android
+title: Android
+# description: Description to be written
+tags: [ 'serverless', 'observability', 'how-to' ]
+---
+
+
+
+
+The Elastic APM Android Agent automatically measures the performance of your application and tracks errors.
+It has a default configuration that suits most common use cases and built-in support for popular frameworks and technologies.
+The agent is built on top of [OpenTelemetry](https://opentelemetry.io/), enabling you to add custom instrumentation with the
+[OpenTelemetry Java API](https://opentelemetry.io/docs/instrumentation/java/manual/).
+
+
+
+## How does the Agent work?
+
+The Agent auto-instruments Supported technologies and records interesting events, like spans for outgoing HTTP requests and UI rendering processes.
+To do this, it leverages the capability of the Android Gradle plugin API to instrument the bytecode of classes.
+This means that for supported technologies, there are no code changes required.
+
+Spans are grouped in transactions -- by default, one for each outgoing HTTP request or UI rendering process.
+It's also possible to create custom transactions with the [OpenTelemetry Java API](https://opentelemetry.io/docs/instrumentation/java/manual/), which is automatically provided to the Agent's host app.
+Transactions and Spans are sent to the APM Server, where they're converted to a format suitable for Elasticsearch.
+You can then use the APM app in Kibana to gain insight into latency issues and error culprits within your application.
+
+More detailed information on how the Agent works can be found in the {/* FAQ */}.
+
+
+
+## Additional components
+
+APM Agents work in conjunction with the [APM Server](((apm-guide-ref))/index.html), [Elasticsearch](((ref))/index.html), and [Kibana](((kibana-ref))/index.html).
+The [APM Guide](((apm-guide-ref))/index.html) provides details on how these components work together, and provides a matrix outlining [Agent and Server compatibility](((apm-guide-ref))/agent-server-compatibility.html).
\ No newline at end of file
diff --git a/docs/apm-agents-elastic-apm-agents.mdx b/docs/apm-agents-elastic-apm-agents.mdx
new file mode 100644
index 0000000000..1c22a3edd8
--- /dev/null
+++ b/docs/apm-agents-elastic-apm-agents.mdx
@@ -0,0 +1,9 @@
+---
+id: serverlessObservabilityApmAgents
+slug: /serverless/observability/apm-agents-elastic-apm-agents
+title: Elastic APM agents
+# description: Description to be written
+tags: [ 'serverless', 'observability', 'overview' ]
+---
+
+No source content found.
diff --git a/docs/apm-agents-go-api.mdx b/docs/apm-agents-go-api.mdx
new file mode 100644
index 0000000000..9c2e0c2998
--- /dev/null
+++ b/docs/apm-agents-go-api.mdx
@@ -0,0 +1,605 @@
+---
+id: serverlessObservabilityApmAgentsGoApi
+slug: /serverless/observability/apm-agents-go-api
+title: API
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+
+This section describes the most commonly used parts of the API.
+
+The Go agent is documented using standard godoc. For complete documentation,
+refer to the documentation at [pkg.go.dev/go.elastic.co/apm/v2](https://pkg.go.dev/go.elastic.co/apm/v2),
+or by using the "godoc" tool.
+
+
+
+## Tracer API
+
+The initial point of contact your application will have with the Go agent
+is the `apm.Tracer` type, which provides methods for reporting
+transactions and errors.
+
+To make instrumentation simpler, the Go agent provides an initialization
+function, `apm.DefaultTracer()`. This tracer is initialized the first time
+`apm.DefaultTracer()` is called, and returned on subsequent calls. The tracer
+returned by this function can be modified using `apm.SetDefaultTracer(tracer)`.
+Calling this will close the previous default tracer, if any exists. This
+tracer is configured with environment variables; see Configuration for
+details.
+
+```go
+import (
+ "go.elastic.co/apm/v2"
+)
+
+func main() {
+ tracer := apm.DefaultTracer()
+ ...
+}
+```
+
+{/* ------------------------------------------------------------------------------------------------- */}
+
+
+
+## Transactions
+
+
+
+### `func (*Tracer) StartTransaction(name, type string) *Transaction`
+
+StartTransaction returns a new Transaction with the specified name and type,
+and with the start time set to the current time. If you need to set the
+timestamp or the parent trace context, use
+Tracer.StartTransactionOptions.
+
+This method should be called at the beginning of a transaction such as a web
+or RPC request. e.g.:
+
+```go
+transaction := apm.DefaultTracer().StartTransaction("GET /", "request")
+```
+
+Transactions will be grouped by type and name in the Elastic APM app.
+
+After starting a transaction, you can record a result and add context to
+further describe the transaction.
+
+```go
+transaction.Result = "Success"
+transaction.Context.SetLabel("region", "us-east-1")
+```
+
+See Context for more details on setting transaction context.
+
+
+
+### `func (*Tracer) StartTransactionOptions(name, type string, opts TransactionOptions) *Transaction`
+
+StartTransactionOptions is essentially the same as StartTransaction, but
+also accepts an options struct. This struct allows you to specify the
+parent trace context and/or the transaction's start time.
+
+```go
+opts := apm.TransactionOptions{
+ Start: time.Now(),
+ TraceContext: parentTraceContext,
+}
+transaction := apm.DefaultTracer().StartTransactionOptions("GET /", "request", opts)
+```
+
+
+
+### `func (*Transaction) End()`
+
+End enqueues the transaction for sending to the Elastic APM server.
+The transaction must not be modified after this, but it may still
+be used for starting spans.
+
+The transaction's duration is calculated as the amount of time
+elapsed between the start of the transaction and this call. To override
+this behavior, the transaction's `Duration` field may be set before
+calling End.
+
+```go
+transaction.End()
+```
+
+
+
+### `func (*Transaction) TraceContext() TraceContext`
+
+TraceContext returns the transaction's trace context.
+
+
+
+### `func (*Transaction) EnsureParent() SpanID`
+
+EnsureParent returns the transaction's parent span ID--generating and recording one if
+it did not previously have one.
+
+EnsureParent enables correlation with spans created by the JavaScript Real User Monitoring
+(RUM) agent for the initial page load. If your backend service generates the HTML page
+dynamically, you can inject the trace and parent span ID into the page in order to initialize
+the JavaScript RUM agent, such that the web browser's page load appears as the root of the
+trace.
+
+```go
+var initialPageTemplate = template.Must(template.New("").Parse(`
+
+
+
+
+
+...
+
+`))
+
+func initialPageHandler(w http.ResponseWriter, req *http.Request) {
+ err := initialPageTemplate.Execute(w, apm.TransactionFromContext(req.Context()))
+ if err != nil {
+ ...
+ }
+}
+```
+
+See the [JavaScript RUM agent documentation](((apm-rum-ref))/index.html) for more information.
+
+
+
+### `func (*Transaction) ParentID() SpanID`
+
+ParentID returns the ID of the transaction's parent, or a zero (invalid) SpanID if the transaction has no parent.
+
+
+
+### `func ContextWithTransaction(context.Context, *Transaction) context.Context`
+
+ContextWithTransaction adds the transaction to the context, and returns the resulting context.
+
+The transaction can be retrieved using apm.TransactionFromContext.
+The context may also be passed into apm.StartSpan, which uses
+TransactionFromContext under the covers to create a span as a child of the transaction.
+
+
+
+### `func TransactionFromContext(context.Context) *Transaction`
+
+TransactionFromContext returns a transaction previously stored in the context using
+apm.ContextWithTransaction, or nil if the context
+does not contain a transaction.
+
+
+
+### `func DetachedContext(context.Context) context.Context`
+
+DetachedContext returns a new context detached from the lifetime of the input, but
+which still returns the same values as the input.
+
+DetachedContext can be used to maintain trace context required to correlate events,
+but where the operation is "fire-and-forget" and should not be affected by the
+deadline or cancellation of the surrounding context.
+
+
+
+### `func TraceFormatter(context.Context) fmt.Formatter`
+
+TraceFormatter returns an implementation of [fmt.Formatter](https://golang.org/pkg/fmt/#Formatter)
+that can be used to format the IDs of the transaction and span stored in the provided context.
+
+The formatter understands the following formats:
+
+ - %v: trace ID, transaction ID, and (if in the context of a span) span ID, space separated
+ - %t: trace ID only
+ - %x: transaction ID only
+ - %s: span ID only
+
+The "+" option can be used to format the values in "key=value" style, with the field
+names `trace.id`, `transaction.id`, and `span.id`. For example, using "%+v" as the format
+would yield "trace.id=... transaction.id=... span.id=...".
+
+For a more in-depth example, see {/* Manual log correlation (unstructured) */}.
+
+{/* ------------------------------------------------------------------------------------------------- */}
+
+
+
+## Spans
+
+To describe an activity within a transaction, we create spans. The Go agent
+has built-in support for generating spans for some activities, such as
+database queries. You can use the API to report spans specific to your
+application.
+
+
+
+### `func (*Transaction) StartSpan(name, spanType string, parent **Span) **Span`
+
+StartSpan starts and returns a new Span within the transaction, with the specified name,
+type, and optional parent span, and with the start time set to the current time.
+If you need to set the timestamp or parent trace context,
+use Transaction.StartSpanOptions.
+
+If the span type contains two dots, they are assumed to separate the span type, subtype,
+and action; a single dot separates span type and subtype, and the action will not be set.
+
+If the transaction is sampled, then the span's ID will be set, and its stacktrace will
+be set if the tracer is configured accordingly. If the transaction is not sampled, then
+the returned span will be silently discarded when its End method is called. To avoid any unnecessary computation for these dropped spans, call the Dropped
+method.
+
+As a convenience, it is valid to create a span on a nil Transaction; the resulting span
+will be non-nil and safe for use, but will not be reported to the APM server.
+
+```go
+span := tx.StartSpan("SELECT FROM foo", "db.mysql.query", nil)
+```
+
+
+
+### `func (*Transaction) StartSpanOptions(name, spanType string, opts SpanOptions) *Span`
+
+StartSpanOptions is essentially the same as StartSpan, but also accepts an options struct.
+This struct allows you to specify the parent trace context and/or the
+spans's start time. If the parent trace context is not specified in the options, then the
+span will be a direct child of the transaction. Otherwise, the parent trace context should
+belong to some span descended from the transaction.
+
+```go
+opts := apm.SpanOptions{
+ Start: time.Now(),
+ Parent: parentSpan.TraceContext(),
+}
+span := tx.StartSpanOptions("SELECT FROM foo", "db.mysql.query", opts)
+```
+
+
+
+### `func StartSpan(ctx context.Context, name, spanType string) (*Span, context.Context)`
+
+StartSpan starts and returns a new Span within the sampled transaction and parent span
+in the context, if any. If the span isn't dropped, it will be included in the resulting
+context.
+
+```go
+span, ctx := apm.StartSpan(ctx, "SELECT FROM foo", "db.mysql.query")
+```
+
+
+
+### `func (*Span) End()`
+
+End marks the span as complete. The Span must not be modified after this,
+but may still be used as the parent of a span.
+
+The span's duration will be calculated as the amount of time elapsed
+since the span was started until this call. To override this behaviour,
+the span's Duration field may be set before calling End.
+
+
+
+### `func (*Span) Dropped() bool`
+
+Dropped indicates whether or not the span is dropped, meaning it will not be reported to
+the APM server. Spans are dropped when the created with a nil, or non-sampled transaction,
+or one whose max spans limit has been reached.
+
+
+
+### `func (*Span) TraceContext() TraceContext`
+
+TraceContext returns the span's trace context.
+
+
+
+### `func ContextWithSpan(context.Context, *Span) context.Context`
+
+ContextWithSpan adds the span to the context and returns the resulting context.
+
+The span can be retrieved using apm.SpanFromContext.
+The context may also be passed into apm.StartSpan, which uses
+SpanFromContext under the covers to create another span as a child of the span.
+
+
+
+### `func SpanFromContext(context.Context) *Span`
+
+SpanFromContext returns a span previously stored in the context using
+apm.ContextWithSpan, or nil if the context
+does not contain a span.
+
+
+
+### `func (*Span) ParentID() SpanID`
+
+ParentID returns the ID of the span's parent.
+
+{/* ------------------------------------------------------------------------------------------------- */}
+
+
+
+## Context
+
+When reporting transactions and errors you can provide context to describe
+those events. Built-in instrumentation will typically provide some context,
+e.g. the URL and remote address for an HTTP request. You can also provide
+custom context and tags.
+
+
+
+### `func (*Context) SetLabel(key string, value interface{})`
+
+SetLabel labels the transaction or error with the given key and value.
+If the key contains any special characters (`.`, `*`, `"`), they will be
+replaced with underscores.
+
+If the value is numerical or boolean, then it will be sent to the server
+as a JSON number or boolean; otherwise it will converted to a string, using
+`fmt.Sprint` if necessary. Numerical and boolean values are supported by
+the server from version 6.7 onwards.
+
+String values longer than 1024 characters will be truncated. Labels are
+indexed in Elasticsearch as keyword fields.
+
+
+Before using labels, ensure you understand the different types of
+[metadata](((apm-guide-ref))/data-model-metadata.html) that are available.
+
+
+
+Avoid defining too many user-specified labels.
+Defining too many unique fields in an index is a condition that can lead to a
+[mapping explosion](((ref))/mapping.html#mapping-limit-settings).
+
+
+
+
+### `func (*Context) SetCustom(key string, value interface{})`
+
+SetCustom is used to add custom, non-indexed, contextual information to
+transactions or errors. If the key contains any special characters
+(`.`, `*`, `"`), they will be replaced with underscores.
+
+Non-indexed means the data is not searchable or aggregatable in Elasticsearch,
+and you cannot build dashboards on top of the data. However, non-indexed
+information is useful for other reasons, like providing contextual information
+to help you quickly debug performance issues or errors.
+
+The value can be of any type that can be encoded using `encoding/json`.
+
+
+Before using custom context, ensure you understand the different types of
+[metadata](((apm-guide-ref))/data-model-metadata.html) that are available.
+
+
+
+
+### `func (*Context) SetUsername(username string)`
+
+SetUsername records the username of the user associated with the transaction.
+
+
+
+### `func (*Context) SetUserID(id string)`
+
+SetUserID records the ID of the user associated with the transaction.
+
+
+
+### `func (*Context) SetUserEmail(email string)`
+
+SetUserEmail records the email address of the user associated with the transaction.
+
+{/* ------------------------------------------------------------------------------------------------- */}
+
+
+
+## Errors
+
+Elastic APM provides two methods of capturing an error event: reporting an error log record,
+and reporting an "exception" (either a panic or an error in Go parlance).
+
+
+
+### `func (*Tracer) NewError(error) *Error`
+
+NewError returns a new Error with details taken from err.
+
+The exception message will be set to `err.Error()`. The exception module and type will be set
+to the package and type name of the cause of the error, respectively, where the cause has the
+same definition as given by [github.com/pkg/errors](https://github.com/pkg/errors).
+
+```go
+e := apm.DefaultTracer().NewError(err)
+...
+e.Send()
+```
+
+The provided error can implement any of several interfaces to provide additional information:
+
+```go
+// Errors implementing ErrorsStacktracer will have their stacktrace
+// set based on the result of the StackTrace method.
+type ErrorsStacktracer interface {
+ StackTrace() github.com/pkg/errors.StackTrace
+}
+
+// Errors implementing Stacktracer will have their stacktrace
+// set based on the result of the StackTrace method.
+type Stacktracer interface {
+ StackTrace() []go.elastic.co/apm/v2/stacktrace.Frame
+}
+
+// Errors implementing Typer will have a "type" field set to the
+// result of the Type method.
+type Typer interface {
+ Type() string
+}
+
+// Errors implementing StringCoder will have a "code" field set to the
+// result of the Code method.
+type StringCoder interface {
+ Code() string
+}
+
+// Errors implementing NumberCoder will have a "code" field set to the
+// result of the Code method.
+type NumberCoder interface {
+ Code() float64
+}
+```
+
+Errors created by with NewError will have their ID field populated with a unique ID.
+This can be used in your application for correlation.
+
+
+
+### `func (*Tracer) NewErrorLog(ErrorLogRecord) *Error`
+
+NewErrorLog returns a new Error for the given ErrorLogRecord:
+
+```go
+type ErrorLogRecord struct {
+ // Message holds the message for the log record,
+ // e.g. "failed to connect to %s".
+ //
+ // If this is empty, "[EMPTY]" will be used.
+ Message string
+
+ // MessageFormat holds the non-interpolated format
+ // of the log record, e.g. "failed to connect to %s".
+ //
+ // This is optional.
+ MessageFormat string
+
+ // Level holds the severity level of the log record.
+ //
+ // This is optional.
+ Level string
+
+ // LoggerName holds the name of the logger used.
+ //
+ // This is optional.
+ LoggerName string
+
+ // Error is an error associated with the log record.
+ //
+ // This is optional.
+ Error error
+}
+```
+
+The resulting Error's log stacktrace will not be set. Call the SetStacktrace method to set it.
+
+```go
+e := apm.DefaultTracer().NewErrorLog(apm.ErrorLogRecord{
+ Message: "Somebody set up us the bomb.",
+})
+...
+e.Send()
+```
+
+
+
+### `func (*Error) SetTransaction(*Transaction)`
+
+SetTransaction associates the error with the given transaction.
+
+
+
+### `func (*Error) SetSpan(*Span)`
+
+SetSpan associates the error with the given span and the span's transaction. When calling SetSpan,
+it is not necessary to also call SetTransaction.
+
+
+
+### `func (*Error) Send()`
+
+Send enqueues the error for sending to the Elastic APM server.
+
+
+
+### `func (*Tracer) Recovered(interface{}) *Error`
+
+Recovered returns an Error from the recovered value, optionally associating it with a transaction.
+The error is not sent; it is the caller's responsibility to set the error's context,
+and then call its `Send` method.
+
+```go
+tx := apm.DefaultTracer().StartTransaction(...)
+defer tx.End()
+defer func() {
+ if v := recover(); v != nil {
+ e := apm.DefaultTracer().Recovered(v)
+ e.SetTransaction(tx)
+ e.Send()
+ }
+}()
+```
+
+
+
+### `func CaptureError(context.Context, error) *Error`
+
+CaptureError returns a new error related to the sampled transaction and span present in the context,
+if any, and sets its exception details using the given error. The Error.Handled field will be set to
+true, and a stacktrace set.
+
+If there is no transaction in the context, or it is not being sampled, CaptureError returns nil.
+As a convenience, if the provided error is nil, then CaptureError will also return nil.
+
+```go
+if err != nil {
+ e := apm.CaptureError(ctx, err)
+ e.Send()
+}
+```
+
+
+
+### Trace Context
+
+Trace context contains the ID for a transaction or span, the ID of the end-to-end trace to which the
+transaction or span belongs, and trace options such as flags relating to sampling. Trace context is
+propagated between processes, e.g. in HTTP headers, in order to correlate events originating from
+related services.
+
+Elastic APM's trace context is based on the [W3C Trace Context](https://w3c.github.io/trace-context/) draft.
+
+
+
+### Error Context
+
+Errors can be associated with context just like transactions. See Context for details.
+In addition, errors can be associated with an active transaction or span using
+SetTransaction or {/* SetSpan */}, respectively.
+
+```go
+tx := apm.DefaultTracer().StartTransaction("GET /foo", "request")
+defer tx.End()
+e := apm.DefaultTracer().NewError(err)
+e.SetTransaction(tx)
+e.Send()
+```
+
+
+
+### Tracer Config
+
+Many configuration attributes can be be updated dynamically via `apm.Tracer` method calls.
+Please refer to the documentation at [pkg.go.dev/go.elastic.co/apm/v2#Tracer](https://pkg.go.dev/go.elastic.co/apm/v2#Tracer)
+for details. The configuration methods are primarily prefixed with `Set`, such as
+[apm#Tracer.SetLogger](https://pkg.go.dev/go.elastic.co/apm/v2#Tracer.SetLogger).
diff --git a/docs/apm-agents-go-configure.mdx b/docs/apm-agents-go-configure.mdx
new file mode 100644
index 0000000000..64402e9bc5
--- /dev/null
+++ b/docs/apm-agents-go-configure.mdx
@@ -0,0 +1,705 @@
+---
+id: serverlessObservabilityApmAgentsGoConfigure
+slug: /serverless/observability/apm-agents-go-configure
+title: Configure
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+{/* import ConfigurationSetupConfig from './transclusion/configuration/setup-config.mdx' */}
+
+
+
+Adapt the Elastic APM Go agent to your needs with one of the following methods--listed in descending order of precedence:
+
+ 1. [APM Agent Configuration via Kibana](((apm-app-ref))/agent-configuration.html)
+ (supported options are marked with Dynamic)
+
+ 1. In code, using the Tracer Config API
+ 1. Environment variables
+
+Configuration defined via Kibana will take precedence over the same
+configuration defined in code, which takes precedence over environment
+variables. If configuration is defined via Kibana, and then that is
+later removed, the agent will revert to configuration defined locally
+via either the Tracer Config API or environment variables.
+
+{/* */}
+
+
+
+## Dynamic configuration
+
+Configuration options marked with the Dynamic badge can be changed at runtime
+when set from a supported source.
+
+The Go Agent supports [Central configuration](((apm-app-ref))/agent-configuration.html),
+which allows you to fine-tune certain configurations via the APM app.
+This feature is enabled in the Agent by default, with `ELASTIC_APM_CENTRAL_CONFIG`.
+
+## Configuration formats
+
+Some options require a unit, either duration or size. These need to be provided
+in a specific format.
+
+### Duration format
+
+The _duration_ format is used for options like timeouts. The unit is provided as
+a suffix directly after the number, without any whitespace.
+
+**Example:** `5ms`
+
+**Supported units:**
+
+- `ms` (milliseconds)
+- `s` (seconds)
+- `m` (minutes)
+
+### Size format
+
+The _size_ format is used for options such as maximum buffer sizes. The unit is
+provided as a suffix directly after the number, without any whitespace.
+
+**Example:** `10KB`
+
+**Supported units:**
+
+- B (bytes)
+- KB (kilobytes)
+- MB (megabytes)
+- GB (gigabytes)
+
+
+We use the power-of-two sizing convention, e.g. 1KB = 1024B.
+
+
+
+
+## `ELASTIC_APM_SERVER_URL`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_SERVER_URL` | `http://localhost:8200` | `http://localhost:8200` |
+
+The URL for your Elastic APM Server. The Server supports both HTTP and HTTPS.
+If you use HTTPS, then you may need to configure your client machines so
+that the server certificate can be verified. You can disable certificate
+verification with `ELASTIC_APM_VERIFY_SERVER_CERT`.
+
+
+
+## `ELASTIC_APM_SERVER_TIMEOUT`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_SERVER_TIMEOUT` | `30s` | `30s` |
+
+The timeout for requests made to your Elastic APM server. When set to zero
+or a negative value, timeouts will be disabled.
+
+
+
+## `ELASTIC_APM_SECRET_TOKEN`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_SECRET_TOKEN` | | "A random string" |
+
+This string is used to ensure that only your agents can send data to your APM server.
+Both the agents and the APM server have to be configured with the same secret token.
+
+
+The secret token is sent as plain-text in every request to the server, so you
+should also secure your communications using HTTPS. Unless you do so, your secret token
+could be observed by an attacker.
+
+
+
+
+## `ELASTIC_APM_API_KEY`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_API_KEY` | | "A base64-encoded string" |
+
+This base64-encoded string is used to ensure that only your agents can send data to your APM server.
+The API key must be created using the APM Server [command line tool](((apm-guide-ref))/api-key.html).
+
+
+The API Key is sent as plain-text in every request to the server, so you should also secure
+your communications using HTTPS. Unless you do so, your API Key could be observed by an attacker.
+
+
+
+
+## `ELASTIC_APM_SERVICE_NAME`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_SERVICE_NAME` | Executable name | `my-app` |
+
+The name of your service or application. This is used to keep all the errors and
+transactions of your service together and is the primary filter in the Elastic APM
+user interface.
+
+If you do not specify `ELASTIC_APM_SERVICE_NAME`, the Go agent will use the
+executable name. e.g. if your executable is called "my-app.exe", then your
+service will be identified as "my-app".
+
+
+The service name must conform to this regular expression: `^[a-zA-Z0-9 _-]+$`.
+In other words: your service name must only contain characters from the ASCII
+alphabet, numbers, dashes, underscores, and spaces.
+
+
+
+
+## `ELASTIC_APM_SERVICE_VERSION`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_SERVICE_VERSION` | | A string indicating the version of the deployed service |
+
+A version string for the currently deployed version of the service.
+If you don't version your deployments, the recommended value for this field is the commit identifier
+of the deployed revision, e.g. the output of `git rev-parse HEAD`.
+
+
+
+## `ELASTIC_APM_SERVICE_NODE_NAME`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_SERVICE_NODE_NAME` | | `my-node-name` |
+
+Optional name used to differentiate between nodes in a service.
+Must be unique, otherwise data from multiple nodes will be aggregated together.
+
+If you do not specify `ELASTIC_APM_SERVICE_NODE_NAME`, service nodes will be identified using the container ID if available,
+otherwise the host name.
+
+
+This feature is fully supported in the APM Server versions >= 7.5.
+
+
+
+
+## `ELASTIC_APM_ENVIRONMENT`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_ENVIRONMENT` | | `"production"` |
+
+The name of the environment this service is deployed in, e.g. "production" or "staging".
+
+Environments allow you to easily filter data on a global level in the APM app.
+It's important to be consistent when naming environments across agents.
+See [environment selector](((apm-app-ref))/filters.html#environment-selector) in the APM app for more information.
+
+
+This feature is fully supported in the APM app in Kibana versions >= 7.2.
+You must use the query bar to filter for a specific environment in versions prior to 7.2.
+
+
+
+
+## `ELASTIC_APM_ACTIVE`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_ACTIVE` | true | `false` |
+
+Enable or disable the agent. If set to false, then the Go agent does not send
+any data to the Elastic APM server, and instrumentation overhead is minimized.
+
+
+
+## `ELASTIC_APM_RECORDING`
+
+Dynamic
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_RECORDING` | true | `false` |
+
+Enable or disable recording of events. If set to false, then the Go agent does not
+send any events to the Elastic APM server, and instrumentation overhead is
+minimized, but the agent will continue to poll the server for configuration changes.
+
+
+
+## `ELASTIC_APM_GLOBAL_LABELS`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_GLOBAL_LABELS` | | `dept=engineering,rack=number8` |
+
+Labels are added to all events. The format for labels is: `key=value[,key=value[,...]]`.
+Any labels set by application via the API will override global labels with the same keys.
+
+This option requires APM Server 7.2 or greater, and will have no effect when using older
+server versions.
+
+
+
+## `ELASTIC_APM_TRANSACTION_IGNORE_URLS`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_TRANSACTION_IGNORE_URLS` | | `/heartbeat*, *.jpg` |
+
+A list of patterns to match HTTP requests to ignore. An incoming HTTP request
+whose request line matches any of the patterns will not be reported as a transaction.
+
+This option supports the wildcard `*`, which matches zero or more characters.
+Examples: `/foo/*/bar/*/baz*`, `*foo*`. Matching is case insensitive by default.
+Prefixing a pattern with `(?-i)` makes the matching case sensitive.
+
+
+This configuration was previously known as `ELASTIC_APM_IGNORE_URLS`, which has been deprecated and will be removed in a future major
+version of the agent.
+
+
+
+
+## `ELASTIC_APM_SANITIZE_FIELD_NAMES`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_SANITIZE_FIELD_NAMES` | `password, passwd, pwd, secret, **key, **token*, **session**, **credit**, **card**, **auth**, set-cookie, **principal**` | `sekrits` |
+
+A list of patterns to match the names of HTTP headers, cookies, and POST form fields to redact.
+
+This option supports the wildcard `*`, which matches zero or more characters.
+Examples: `/foo/*/bar/*/baz*`, `*foo*`. Matching is case insensitive by default.
+Prefixing a pattern with `(?-i)` makes the matching case sensitive.
+
+
+
+## `ELASTIC_APM_CAPTURE_HEADERS`
+
+Dynamic
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_CAPTURE_HEADERS` | `true` |
+
+For transactions that are HTTP requests, the Go agent can optionally capture request and response headers.
+
+Possible values: `true`, `false`.
+
+Captured headers are subject to sanitization, per `ELASTIC_APM_SANITIZE_FIELD_NAMES`.
+
+
+
+## `ELASTIC_APM_CAPTURE_BODY`
+
+Dynamic
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_CAPTURE_BODY` | `off` |
+
+For transactions that are HTTP requests, the Go agent can optionally capture the request body.
+
+Possible values: `errors`, `transactions`, `all`, `off`.
+
+
+Request bodies often contain sensitive values like passwords, credit card numbers, and so on.
+If your service handles data like this, enable this feature with care.
+
+
+
+
+## `ELASTIC_APM_HOSTNAME`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_HOSTNAME` | `os.Hostname()` | `app-server01` |
+
+The host name to use when sending error and transaction data to the APM server.
+
+
+
+## `ELASTIC_APM_API_REQUEST_TIME`
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_API_REQUEST_TIME` | `10s` |
+
+The amount of time to wait before ending a request to the Elastic APM server.
+When you report transactions, spans and errors, the agent will initiate a
+request and send them to the server when there is enough data to send; the
+request will remain open until this time has been exceeded, or until the
+maximum request size has been reached.
+
+
+
+## `ELASTIC_APM_API_REQUEST_SIZE`
+
+| Environment | Default | Minimum | Maximum |
+|---|---|---|---|
+| `ELASTIC_APM_API_REQUEST_SIZE` | `750KB` | `1KB` | `5MB` |
+
+The maximum size of request bodies to send to the Elastic APM server.
+The agent will maintain an in-memory buffer of compressed data for streaming
+to the APM server.
+
+
+
+## `ELASTIC_APM_API_BUFFER_SIZE`
+
+| Environment | Default | Minimum | Maximum |
+|---|---|---|---|
+| `ELASTIC_APM_API_BUFFER_SIZE` | `1MB` | `10KB` | `100MB` |
+
+The maximum number of bytes of uncompressed, encoded events to store in memory
+while the agent is busy. When the agent is able to, it will transfer buffered
+data to the request buffer, and start streaming it to the server. If the buffer
+fills up, new events will start replacing older ones.
+
+
+
+## `ELASTIC_APM_TRANSACTION_MAX_SPANS`
+
+Dynamic
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_TRANSACTION_MAX_SPANS` | `500` |
+
+Limits the amount of spans that are recorded per transaction.
+
+This is helpful in cases where a transaction creates a large number
+of spans (e.g. thousands of SQL queries). Setting an upper limit will
+prevent overloading the agent and the APM server with too much work
+for such edge cases.
+
+
+
+## `ELASTIC_APM_EXIT_SPAN_MIN_DURATION`
+
+Dynamic
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_EXIT_SPAN_MIN_DURATION` | `1ms` |
+
+Sets the minimum duration for an exit span to be reported. Spans shorter or
+equal to this threshold will be dropped by the agent and reported as statistics
+in the span's transaction, as long as the transaction didn't end before the span
+was reported.
+
+When span compression is enabled (`ELASTIC_APM_SPAN_COMPRESSION_ENABLED`), the sum
+of the compressed span composite is considered.
+
+The minimum duration allowed for this setting is 1 microsecond (`us`).
+
+
+
+## `ELASTIC_APM_SPAN_FRAMES_MIN_DURATION`
+
+Dynamic
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_SPAN_FRAMES_MIN_DURATION` | `5ms` |
+
+The APM agent will collect a stack trace for every recorded span whose duration
+exceeds this configured value. While this is very helpful to find the exact
+place in your code that causes the span, collecting this stack trace does have
+some processing and storage overhead.
+
+
+This configuration has been deprecated and will be removed in a future major version of the agent.
+
+
+
+
+## `ELASTIC_APM_SPAN_STACK_TRACE_MIN_DURATION`
+
+Dynamic
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_SPAN_STACK_TRACE_MIN_DURATION` | `5ms` |
+
+The APM agent will collect a stack trace for every recorded span whose duration
+exceeds this configured value. While this is very helpful to find the exact
+place in your code that causes the span, collecting this stack trace does have
+some processing and storage overhead.
+
+
+This configuration was previously known as `ELASTIC_APM_SPAN_FRAMES_MIN_DURATION`, which has been deprecated and will be removed in a future major
+version of the agent.
+
+
+
+
+## `ELASTIC_APM_STACK_TRACE_LIMIT`
+
+Dynamic
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_STACK_TRACE_LIMIT` | `50` |
+
+Limits the number of frames captured for each stack trace.
+
+Setting the limit to 0 will disable stack trace collection, while any positive
+integer value will be used as the maximum number of frames to collect. Setting
+a negative value, such as -1, means that all frames will be collected.
+
+
+
+## `ELASTIC_APM_TRANSACTION_SAMPLE_RATE`
+
+Dynamic
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_TRANSACTION_SAMPLE_RATE` | `1.0` |
+
+By default, the agent will sample every transaction (e.g. request to your service).
+To reduce overhead and storage requirements, set the sample rate to a value
+between `0.0` and `1.0`. We still record overall time and the result for unsampled
+transactions, but no context information, tags, or spans.
+
+
+
+## `ELASTIC_APM_METRICS_INTERVAL`
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_METRICS_INTERVAL` | 30s |
+
+The interval at which APM agent gathers and reports metrics. Set to `0s` to disable.
+
+
+
+## `ELASTIC_APM_DISABLE_METRICS`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_DISABLE_METRICS` | | `system.*, **cpu**` |
+
+Disables the collection of certain metrics. If the name of a metric matches any of
+the wildcard expressions, it will not be collected.
+
+This option supports the wildcard `*`, which matches zero or more characters.
+Examples: `/foo/*/bar/*/baz*`, `*foo*`. Matching is case insensitive by default.
+Prefixing a pattern with `(?-i)` makes the matching case sensitive.
+
+
+
+## `ELASTIC_APM_BREAKDOWN_METRICS`
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_BREAKDOWN_METRICS` | `true` |
+
+Capture breakdown metrics. Set to `false` to disable.
+
+
+
+## `ELASTIC_APM_SERVER_CERT`
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_SERVER_CERT` | |
+
+If you have configured your APM Server with a self signed TLS certificate, or you
+want to pin the server certificate, specify the path to the PEM-encoded
+certificate via the `ELASTIC_APM_SERVER_CERT` configuration.
+
+
+
+## `ELASTIC_APM_SERVER_CA_CERT_FILE`
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_SERVER_CA_CERT_FILE` | |
+
+The path to a PEM-encoded TLS Certificate Authority certificate that will be
+used for verifying the server's TLS certificate chain.
+
+
+
+## `ELASTIC_APM_VERIFY_SERVER_CERT`
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_VERIFY_SERVER_CERT` | `true` |
+
+By default, the agent verifies the server's certificate if you use an
+HTTPS connection to the APM server. Verification can be disabled by
+changing this setting to `false`. This setting is ignored when
+`ELASTIC_APM_SERVER_CERT` is set.
+
+
+
+## `ELASTIC_APM_LOG_FILE`
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_LOG_FILE` | |
+
+`ELASTIC_APM_LOG_FILE` specifies the output file for the agent's default, internal
+logger. The file will be created, or truncated if it exists, when the process starts.
+By default, logging is disabled. You must specify `ELASTIC_APM_LOG_FILE` to enable
+it. This environment variable will be ignored if a logger is configured programatically.
+
+There are two special file names that the agent recognizes: `stdout` and `stderr`.
+These will configure the logger to write to standard output and standard error
+respectively.
+
+
+
+## `ELASTIC_APM_LOG_LEVEL`
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_LOG_LEVEL` | `"error"` |
+
+`ELASTIC_APM_LOG_LEVEL` specifies the log level for the agent's default, internal
+logger. The only two levels used by the logger are "error" and "debug". By default,
+logging is disabled. You must specify `ELASTIC_APM_LOG_FILE` to enable it.
+
+This environment variable will be ignored if a logger is configured programatically.
+
+
+
+### `ELASTIC_APM_CENTRAL_CONFIG`
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_CENTRAL_CONFIG` | `true` |
+
+Activate APM Agent central configuration via Kibana. By default the agent will poll the server
+for agent configuration changes. This can be disabled by changing the setting to `false`.
+See [APM Agent central configuration](((kibana-ref))/agent-configuration.html) for more information.
+
+
+This feature requires APM Server v7.3 or later.
+
+
+
+
+### `ELASTIC_APM_USE_ELASTIC_TRACEPARENT_HEADER`
+| | |
+|---|---|
+| Environment | Default |
+| `ELASTIC_APM_USE_ELASTIC_TRACEPARENT_HEADER` | `true` |
+
+To enable [distributed tracing](((apm-guide-ref))/apm-distributed-tracing.html), the agent
+adds trace context headers to outgoing HTTP requests made with {/* module/apmhttp */}.
+These headers (`traceparent` and `tracestate`) are defined in the
+[W3C Trace Context](https://www.w3.org/TR/trace-context-1/) specification.
+
+When this setting is `true`, the agent will also add the header `elastic-apm-traceparent`
+for backwards compatibility with older versions of Elastic APM agents.
+
+
+
+### `ELASTIC_APM_CLOUD_PROVIDER`
+
+| Environment | Default | Example |
+|---|---|---|
+| `ELASTIC_APM_CLOUD_PROVIDER` | `"none"` | `"aws"` |
+
+This config value allows you to specify which cloud provider should be assumed
+for metadata collection. By default, the agent will use trial and error to
+automatically collect the cloud metadata.
+
+Valid options are `"none"`, `"auto"`, `"aws"`, `"gcp"`, and `"azure"`
+If this config value is set to `"none"`, then no cloud metadata will be collected.
+
+
+
+## `ELASTIC_APM_SPAN_COMPRESSION_ENABLED`
+
+Dynamic
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_SPAN_COMPRESSION_ENABLED` | `true` |
+
+When enabled, the agent will attempt to compress _short_ exit spans that share the
+same parent into a composite span. The exact duration for what is considered
+_short_, depends on the compression strategy used (`same_kind` or `exact_match`).
+
+In order for a span to be compressible, these conditions need to be met:
+
+* Spans are exit spans.
+* Spans are siblings (share the same parent).
+* Spans have not propagated their context downstream.
+* Each span duration is equal or lower to the compression strategy maximum duration.
+* Spans are compressed with `same_kind` strategy when these attributes are equal:
+ * `span.type`.
+ * `span.subtype`.
+ * `span.context.destination.service.resource`
+* Spans are compressed with `exact_match` strategy when all the previous conditions
+ are met and the `span.name` is equal.
+
+Compressing short exit spans should provide some storage savings for services that
+create a lot of consecutive short exit spans to for example databases or cache
+services which are generally uninteresting when viewing a trace.
+
+
+This feature is experimental and requires APM Server v7.15 or later.
+
+
+
+
+## `ELASTIC_APM_SPAN_COMPRESSION_EXACT_MATCH_MAX_DURATION`
+
+Dynamic
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_SPAN_COMPRESSION_EXACT_MATCH_MAX_DURATION` | `50ms` |
+
+The maximum duration to consider for compressing sibling exit spans that are an
+exact match for compression.
+
+
+
+## `ELASTIC_APM_SPAN_COMPRESSION_SAME_KIND_MAX_DURATION`
+
+Dynamic
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_SPAN_COMPRESSION_SAME_KIND_MAX_DURATION` | `0ms` |
+
+The maximum duration to consider for compressing sibling exit spans that are of
+the same kind for compression.
+
+
+
+## `ELASTIC_APM_TRACE_CONTINUATION_STRATEGY`
+
+Dynamic
+
+| Environment | Default |
+|---|---|
+| `ELASTIC_APM_TRACE_CONTINUATION_STRATEGY` | `continue` |
+
+This option allows some control over how the APM agent handles W3C trace-context headers on incoming requests.
+By default, the traceparent and tracestate headers are used per W3C spec for distributed tracing.
+However, in certain cases it can be helpful to not use the incoming traceparent header. Some example use cases:
+
+- An Elastic-monitored service is receiving requests with traceparent headers from unmonitored services.
+- An Elastic-monitored service is publicly exposed, and does not want tracing data (trace-ids, sampling decisions) to possibly be spoofed by user requests.
+
+Valid options are `continue`, `restart`, and `restart_external`:
+
+continue
+ : The default behavior. An incoming `traceparent` value is used to continue the trace and determine the sampling decision.
+restart
+ : Always ignores the `traceparent` header of incoming requests. A new trace-id will be generated and the sampling decision will be made based on `transaction_sample_rate`. A span link will be made to the incoming `traceparent`.
+restart_external
+ : If an incoming request includes the `es` vendor flag in `tracestate`, then any `traceparent` will be considered internal and will be handled as described for **continue** above. Otherwise, any `traceparent` is considered external and will be handled as described for **restart** above.
+
+Starting with Elastic Observability 8.2, span links are visible in trace views.
diff --git a/docs/apm-agents-go-get-started.mdx b/docs/apm-agents-go-get-started.mdx
new file mode 100644
index 0000000000..b3ae58381f
--- /dev/null
+++ b/docs/apm-agents-go-get-started.mdx
@@ -0,0 +1,59 @@
+---
+id: serverlessObservabilityApmAgentsGoGetStarted
+slug: /serverless/observability/apm-agents-go-get-started
+title: Get started
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+{/* import ConfigurationSetupConfig from './transclusion/configuration/setup-config.mdx' */}
+
+
+
+To start reporting your Go application's performance to Elastic APM, you need to do a few things:
+
+1. Install the Agent.
+1. Instrument Go Source Code.
+1. Configure the Agent.
+
+
+
+## Install the Agent
+
+Install the Elastic APM Go agent package using `go get`:
+
+```bash
+go get -u go.elastic.co/apm/v2
+```
+
+### Requirements
+
+You can find a list of the supported frameworks and other technologies in the
+Supported Technologies section.
+
+
+
+## Instrument Go Source Code
+
+Instrumentation is the process of extending your application's code to report trace data to Elastic APM.
+Go applications must be instrumented manually at the source code level.
+There are two ways to instrument your applications:
+
+* Using {/* Built-in instrumentation modules */}.
+* {/* Custom instrumentation */}
+and {/* Context propagation */} with the Go Agent API.
+
+Where possible, use the built-in modules to report transactions served by web and RPC frameworks in your application.
+
+
+
+## Configure the Agent
+
+{/* */}
+
+See Configuration to learn about all available options.
+
+{/* The include that was here is another page */}
+{/* The include that was here is another page */}
+{/* The include that was here is another page */}
diff --git a/docs/apm-agents-go-install.mdx b/docs/apm-agents-go-install.mdx
new file mode 100644
index 0000000000..8805349287
--- /dev/null
+++ b/docs/apm-agents-go-install.mdx
@@ -0,0 +1,9 @@
+---
+id: serverlessObservabilityApmAgentsGoInstall
+slug: /serverless/observability/apm-agents-go-install
+title: Install
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+No source content found.
diff --git a/docs/apm-agents-go-performance-tuning.mdx b/docs/apm-agents-go-performance-tuning.mdx
new file mode 100644
index 0000000000..4dbc139c5b
--- /dev/null
+++ b/docs/apm-agents-go-performance-tuning.mdx
@@ -0,0 +1,9 @@
+---
+id: serverlessObservabilityApmAgentsGoPerformanceTuning
+slug: /serverless/observability/apm-agents-go-performance-tuning
+title: Performance tuning
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+No source content found.
diff --git a/docs/apm-agents-go-supported-technologies.mdx b/docs/apm-agents-go-supported-technologies.mdx
new file mode 100644
index 0000000000..87db018586
--- /dev/null
+++ b/docs/apm-agents-go-supported-technologies.mdx
@@ -0,0 +1,327 @@
+---
+id: serverlessObservabilityApmAgentsGoSupportedTechnologies
+slug: /serverless/observability/apm-agents-go-supported-technologies
+title: Supported technologies
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+
+This page describes the technologies supported by the Elastic APM Go agent.
+
+If your favorite technology is not supported yet, you can vote for it by
+participating in our [survey](https://docs.google.com/forms/d/e/1FAIpQLScbW7D8m-otPO7cxqeg7XstWR8vMnxG6brnXLs_TFVSTHuHvg/viewform?usp=sf_link), or joining the conversation in the [Discuss forum](https://discuss.elastic.co/c/apm).
+We will use the results of the survey and Discuss topics to add support
+for the most requested technologies.
+
+If you would like to get more involved, take a look at the {/* contributing guide */}.
+
+
+
+## Go
+
+The Elastic APM Go agent naturally requires Go. We support the last two major
+Go releases as described by [Go's Release Policy](https://golang.org/doc/devel/release.html#policy):
+
+> Each major Go release is supported until there are two newer major releases.
+> For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release.
+
+
+
+## Web Frameworks
+
+We support several third-party web frameworks, as well as Go's standard `net/http`
+package. Regardless of the framework, we create a transaction for each incoming
+request, and name the transaction after the registered route.
+
+### fasthttp
+
+We support [valyala/fasthttp](https://github.com/valyala/fasthttp),
+[v1.26.0](https://github.com/valyala/fasthttp/releases/tag/v1.26.0) and greater.
+
+See {/* module/apmfasthttp */} for more information
+about fasthttp instrumentation.
+
+### httprouter
+
+[julienschmidt/httprouter](https://github.com/julienschmidt/httprouter) does
+not use semantic versioning, but its API is relatively stable. Any recent
+version should be compatible with the Elastic APM Go agent.
+
+See {/* module/apmhttprouter */} for more
+information about httprouter instrumentation.
+
+### Echo
+
+We support the [Echo](https://echo.labstack.com/) web framework,
+[v3.3.5](https://github.com/labstack/echo/releases/tag/3.3.5) and greater.
+
+We provide different packages for the Echo v3 and v4 versions:
+`module/apmecho` for Echo v3.x, and `module/apmechov4` for Echo v4.x.
+
+See {/* module/apmecho */} for more information
+about Echo instrumentation.
+
+### Gin
+
+We support the [Gin](https://gin-gonic.com/) web framework,
+[v1.2](https://github.com/gin-gonic/gin/releases/tag/v1.2) and greater.
+
+See {/* module/apmgin */} for more information
+about Gin instrumentation.
+
+### Fiber
+
+We support the [Fiber](https://gofiber.io/) web framework,
+[v2.18.0](https://github.com/gofiber/fiber/releases/tag/v2.18.0) and greater.
+
+We provide package only for the Fiber v2.
+See {/* module/apmfiber */} for more information
+about Fiber instrumentation.
+
+### Beego
+
+We support the [Beego](https://beego.me/) web framework,
+[v1.10.0](https://github.com/astaxie/beego/releases/tag/v1.10.0) and greater.
+
+See {/* module/apmbeego */} for more information
+about Beego instrumentation.
+
+### gorilla/mux
+
+We support [gorilla/mux](http://www.gorillatoolkit.org/pkg/mux)
+[v1.6.1](https://github.com/gorilla/mux/releases/tag/v1.6.1) and greater.
+Older versions are not supported due to the use of gorilla.Middleware.
+
+See {/* module/apmgorilla */} for more information
+about gorilla/mux instrumentation.
+
+### go-restful
+
+We support [go-restful](https://github.com/emicklei/go-restful),
+[2.0.0](https://github.com/emicklei/go-restful/releases/tag/2.0.0) and greater.
+
+See {/* module/apmrestful */} for more information
+about go-restful instrumentation.
+
+### chi
+
+We support [chi](https://github.com/go-chi/chi),
+[v4.0.0](https://github.com/go-chi/chi/releases/tag/v4.0.0) and greater.
+
+See {/* module/apmchi */} for more information
+about chi instrumentation.
+
+### negroni
+
+We support [negroni](https://github.com/urfave/negroni),
+[v1.0.0](https://github.com/urfave/negroni/releases/tag/v1.0.0) and greater.
+
+See {/* module/apmnegroni */} for more information
+about negroni instrumentation.
+
+
+
+## Databases
+
+### database/sql
+
+We support tracing requests with any `database/sql` driver, provided
+the driver is registered with the Elastic APM Go agent. Spans will be
+created for each statemented executed.
+
+When using one of the following drivers, the Elastic APM Go agent will
+be able to parse the datasource name, and provide more context in the
+spans it emits:
+
+- [lib/pq](https://github.com/lib/pq) (PostgreSQL)
+- [jackc/pgx](https://github.com/jackc/pgx) (PostgreSQL)
+- [go-sql-driver/mysql](https://github.com/go-sql-driver/mysql)
+- [mattn/go-sqlite3](https://github.com/go-sqlite3)
+
+See {/* module/apmsql */} for more information
+about database/sql instrumentation.
+
+### GORM
+
+We support the [GORM](http://gorm.io/) object-relational mapping library,
+[v1.9](https://github.com/jinzhu/gorm/releases/tag/v1.9) and greater.
+Spans will be created for each create, query, update, and delete
+operation.
+
+As with `database/sql` support we provide additional support for the
+postgres, mysql, and sqlite dialects.
+
+We provide different packages for the Gorm v1 and v2 versions:
+`module/apmgorm` for Gorm v1.x, and `module/apmgormv2` for Gorm v2.x.
+
+See {/* module/apmgorm or module/apmgormv2 */} for more information
+about GORM instrumentation.
+
+### go-pg/pg
+
+We support the [go-pg/pg](https://github.com/go-pg/pg) PostgreSQL ORM,
+[v8.0.4](https://github.com/go-pg/pg/releases/tag/v8.0.4). Spans will
+be created for each database operation.
+
+See {/* module/apmgopg */} for more information
+about go-pg instrumentation.
+
+### Cassandra (gocql)
+
+[GoCQL](https://gocql.github.io/) does not have a stable API, so we will
+provide support for the most recent API, and older versions of the API
+on a best-effort basis. Spans will be created for each query. When the
+batch API is used, a span will be created for the batch, and a sub-span
+is created for each query in the batch.
+
+See {/* module/apmgocql */} for more information
+about GoCQL instrumentation.
+
+### Redis (gomodule/redigo)
+
+We support [Redigo](https://github.com/gomodule/redigo),
+[v2.0.0](https://github.com/gomodule/redigo/tree/v2.0.0) and greater.
+We provide helper functions for reporting Redis commands as spans.
+
+See {/* module/apmredigo */} for more information
+about Redigo instrumentation.
+
+### Redis (go-redis/redis)
+
+We support [go-redis](https://github.com/go-redis/redis),
+[v6.15.3](https://github.com/go-redis/redis/tree/v6.15.3).
+We provide helper functions for reporting Redis commands as spans.
+
+See {/* module/apmgoredis */} for more information
+about go-redis instrumentation.
+
+### Elasticsearch
+
+We provide instrumentation for Elasticsearch clients. This is usable with
+the [go-elasticsearch](https://github.com/elastic/go-elasticsearch) and
+[olivere/elastic](https://github.com/olivere/elastic) clients, and should
+also be usable with any other clients that provide a means of configuring
+the underlying `net/http.RoundTripper`.
+
+See {/* module/apmelasticsearch */} for more
+information about Elasticsearch client instrumentation.
+
+### MongoDB
+
+We provide instrumentation for the official
+[MongoDB Go Driver](https://github.com/mongodb/mongo-go-driver),
+[v1.0.0](https://github.com/mongodb/mongo-go-driver/releases/tag/v1.0.0) and
+greater. Spans will be created for each MongoDB command executed within a
+context containing a transaction.
+
+See {/* module/apmmongo */} for more information about
+the MongoDB Go Driver instrumentation.
+
+### DynamoDB
+
+We provide instrumentation for AWS DynamoDB. This is usable with
+[AWS SDK Go](https://github.com/aws/aws-sdk-go).
+
+See {/* module/apmawssdkgo */} for more information
+about AWS SDK Go instrumentation.
+
+
+
+## RPC Frameworks
+
+### gRPC
+
+We support [gRPC](https://grpc.io/)
+[v1.3.0](https://github.com/grpc/grpc-go/releases/tag/v1.3.0) and greater.
+We provide unary and stream interceptors for both the client and server.
+The server interceptor will create a transaction for each incoming request,
+and the client interceptor will create a span for each outgoing request.
+
+See {/* module/apmgrpc */} for more information
+about gRPC instrumentation.
+
+
+
+## Service Frameworks
+
+### Go kit
+
+We support tracing [Go kit](https://gokit.io/) clients and servers when
+using the gRPC or HTTP transport, by way of {/* module/apmgrpc */}
+and {/* module/apmhttp */} respectively.
+
+Code examples are available at https://pkg.go.dev/go.elastic.co/apm/module/apmgokit/v2
+for getting started.
+
+
+
+## Logging frameworks
+
+### Logrus
+
+We support log correlation and exception tracking with
+[Logrus](https://github.com/sirupsen/logrus/),
+[v1.1.0](https://github.com/sirupsen/logrus/releases/tag/v1.1.0) and greater.
+
+See {/* module/apmlogrus */} for more information
+about Logrus integration.
+
+### Zap
+
+We support log correlation and exception tracking with
+[Zap](https://github.com/uber-go/zap/),
+[v1.0.0](https://github.com/uber-go/zap/releases/tag/v1.0.0) and greater.
+
+See {/* module/apmzap */} for more information
+about Zap integration.
+
+### Zerolog
+
+We support log correlation and exception tracking with
+[Zerolog](https://github.com/rs/zerolog/),
+[v1.12.0](https://github.com/rs/zerolog/releases/tag/v1.12.0) and greater.
+
+See {/* module/apmzerolog */} for more information
+about Zerolog integration.
+
+
+
+## Object Storage
+
+### Amazon S3
+We provide instrumentation for AWS S3. This is usable with
+[AWS SDK Go](https://github.com/aws/aws-sdk-go).
+
+See {/* module/apmawssdkgo */} for more information
+about AWS SDK Go instrumentation.
+
+### Azure Storage
+We provide instrumentation for Azure Storage. This is usable with:
+
+- github.com/Azure/azure-storage-blob-go/azblob[Azure Blob Storage]
+- github.com/Azure/azure-storage-queue-go/azqueue[Azure Queue Storage]
+- github.com/Azure/azure-storage-file-go/azfile[Azure File Storage]
+
+See {/* module/apmazure */} for more information
+about Azure SDK Go instrumentation.
+
+
+
+## Messaging Systems
+
+### Amazon SQS
+We provide instrumentation for AWS SQS. This is usable with
+[AWS SDK Go](https://github.com/aws/aws-sdk-go).
+
+See {/* module/apmawssdkgo */} for more information
+about AWS SDK Go instrumentation.
+
+### Amazon SNS
+We provide instrumentation for AWS SNS. This is usable with
+[AWS SDK Go](https://github.com/aws/aws-sdk-go).
+
+See {/* module/apmawssdkgo */} for more information
+about AWS SDK Go instrumentation.
diff --git a/docs/apm-agents-go.mdx b/docs/apm-agents-go.mdx
new file mode 100644
index 0000000000..707469834a
--- /dev/null
+++ b/docs/apm-agents-go.mdx
@@ -0,0 +1,51 @@
+---
+id: serverlessObservabilityApmAgentsGo
+slug: /serverless/observability/apm-agents-go
+title: Go
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+
+The Elastic APM Go Agent enables you to trace the execution of operations in your [Go](https://golang.org/)
+applications, sending performance metrics and errors to the Elastic APM server.
+It has built-in support for popular frameworks and toolkits,
+like [Gorilla](http://www.gorillatoolkit.org/) and [Gin](https://gin-gonic.com/),
+as well as support for instrumenting Go's built-in [net/http](https://golang.org/pkg/net/http/),
+[database/sql](https://golang.org/pkg/database/sql/) drivers.
+The Agent also offers an API Documentation for custom instrumentation.
+
+
+
+## How does the Agent work?
+
+The Agent includes instrumentation modules for Supported Technologies,
+each providing middleware or wrappers for recording interesting events, such as incoming HTTP requests, outgoing HTTP requests, and database queries.
+
+To collect data about incoming HTTP requests, install router middleware for one of the supported Web Frameworks.
+Incoming requests will be recorded as transactions, along with any related panics or errors.
+
+To collect data for outgoing HTTP requests, instrument an `http.Client` or `http.Transport` using {/* module/apmhttp */}.
+To collect data about database queries, use {/* module/apmsql */},
+which provides instrumentation for well known database drivers.
+
+In order to connect transactions with related spans and errors, and propagate traces between services (distributed tracing),
+the agent relies on Go's built-in [context](https://golang.org/pkg/context/) package:
+transactions and spans are stored in context objects.
+For example, for incoming HTTP requests, in-flight trace data will be recorded in the `context` object accessible through
+[net/http.Context](https://golang.org/pkg/net/http/#Request.Context).
+Read more about this in {/* Context propagation */}.
+
+In addition to capturing events like those mentioned above,
+the agent also collects system and application metrics at regular intervals.
+This collection happens in a background goroutine that is automatically started when the agent is initialized.
+
+
+
+## Additional Components
+
+APM Agents work in conjunction with the [APM Server](((apm-guide-ref))/index.html), [Elasticsearch](((ref))/index.html), and [Kibana](((kibana-ref))/index.html).
+The [APM Guide](((apm-guide-ref))/index.html) provides details on how these components work together,
+and provides a matrix outlining [Agent and Server compatibility](((apm-guide-ref))/agent-server-compatibility.html).
diff --git a/docs/apm-agents-ios-api.mdx b/docs/apm-agents-ios-api.mdx
new file mode 100644
index 0000000000..9fd46a9bac
--- /dev/null
+++ b/docs/apm-agents-ios-api.mdx
@@ -0,0 +1,9 @@
+---
+id: serverlessObservabilityApmAgentsIosApi
+slug: /serverless/observability/apm-agents-ios-api
+title: API
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+No source content found.
diff --git a/docs/apm-agents-ios-configure.mdx b/docs/apm-agents-ios-configure.mdx
new file mode 100644
index 0000000000..ba24f02333
--- /dev/null
+++ b/docs/apm-agents-ios-configure.mdx
@@ -0,0 +1,73 @@
+---
+id: serverlessObservabilityApmAgentsIosConfigure
+slug: /serverless/observability/apm-agents-ios-configure
+title: Configure
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+
+Configure the agent with `AgentConfigBuilder` passing the `AgentConfiguration` to the `start` function.
+
+{/* some config example that preferably is correct unlike mine */}
+
+```swift
+let config = AgentConfigBuilder()
+ .withServerUrl(URL(string: "http://localhost:8200"))
+ .withSecretToken("")
+ .build()
+
+Agent.start(with:config)
+```
+
+The `AgentConfigBuilder` can be configured with the following functions
+
+
+
+## Configuration options
+
+
+
+### `withServerUrl`
+
+* **Type:** URL
+* **Default:** `http://127.0.0.1:8200`
+
+
+
+### `withSecretToken`
+* **Type:** String
+* **Default:** nil
+* **Env:** `OTEL_EXPORTER_OTLP_HEADERS`
+
+Sets the secret token for connecting to an authenticated APM Server. If using the env-var, the whole header map must be defined per [OpenTelemetry Protocol Exporter Config](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md) (e.g.: `OTEL_EXPORTER_OTLP_HEADERS="Authorization=bearer "`)
+
+This setting is mutually exclusive with `withApiKey`
+
+
+
+### `withApiKey`
+* **Type:** String
+* **Default:** nil
+* **Env:** `OTEL_EXPORTER_OTLP_HEADERS`
+
+Sets the API Token for connecting to an authenticated APM Server. If using the env-var, the whole header map must be defined per [OpenTelemetry Protocol Exporter Config](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md) (e.g.: `OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey "`)
+
+This setting is mutually exclusive with `withSecretToken`
+
+
+
+#### `disableAgent() -> Self`
+Disables the Elastic agent. This is useful for disabling the agent during development without having to remove the Elastic agent completely. A log will report `"Elastic APM Agent has been disabled."`
+
+
+
+# Resource Attribute Injection
+In v0.5.0, the agent provides a means to set [resource attributes](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md#specifying-resource-information-via-an-environment-variable) using the `OTEL_RESOURCE_ATTRIBUTES` env-var. This env-var also works through the application plist. Any resource attribute can be overridden using this method, so care should be taken, as some attributes are critical to the functioning of the kibana UI.
+
+
+
+## `deployment.environment`
+Deployment environment is set to `default`. This can be overridden using the `OTEL_RESOURCE_ATTRIBUTES` set in your deployment's plist. Use the field key as `OTEL_RESOURCE_ATTRIBUTES` and the value as `deployment.environment=staging`
\ No newline at end of file
diff --git a/docs/apm-agents-ios-get-started.mdx b/docs/apm-agents-ios-get-started.mdx
new file mode 100644
index 0000000000..5f89f0a70f
--- /dev/null
+++ b/docs/apm-agents-ios-get-started.mdx
@@ -0,0 +1,269 @@
+---
+id: serverlessObservabilityApmAgentsIosGetStarted
+slug: /serverless/observability/apm-agents-ios-get-started
+title: Get started
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+
+export let source_highlighter = "coderay"
+
+
+
+## Requirements
+
+This project requires Swift `5.7`, and is intended for use in Swift-base mobile apps.
+
+Other platform requires:
+
+| platform | version |
+|---|---|
+| `iOS` | `11` |
+| `macOS` | `10.13` |
+| `tvOS` | `v11` |
+| `watchOS` | `3` |
+
+
+
+## Add the Agent dependency
+Add the Elastic APM iOS Agent to your Xcode project or your `Package.swift`.
+
+Here are instructions for adding a [package dependency](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) to a standard Xcode poject.
+
+Details of adding dependencies to your Package.swift can be found on ['Add a Dependency on Another Swift Package'](https://developer.apple.com/documentation/xcode/creating_a_standalone_swift_package_with_xcode#3578941).
+Below is a helpful code-snippet:
+
+`package.swift`:
+
+```swift
+Package(
+ dependencies:[
+ .package(name: "apm-agent-ios", url: "https://github.com/elastic/apm-agent-ios.git", from: "0.6.0"),
+ ],
+ targets:[
+ .target(
+ name: "MyApp",
+ dependencies: [
+ .product(name: "iOSAgent", package: "apm-agent-ios")
+ ]
+ ),
+])
+```
+
+
+
+## Initialize the agent
+Once the Agent has been added as a dependency, it must be initialized.
+
+If you're using `SwiftUI` to build your app add the following to your `App.swift`:
+
+```swift
+import SwiftUI
+import iOSAgent
+
+@main
+struct MyApp: App {
+ init() {
+ var config = AgentConfigBuilder()
+ .withServerUrl(URL(string:"http://127.0.0.1:8200")) [^1]
+ .withSecretToken("") [^2]
+ .build()
+
+ Agent.start(with: config)
+ }
+ var body: some Scene {
+ WindowGroup {
+ ContentView()
+ }
+ }
+}
+```
+[^1]: APM Server URL
+[^2]: Set secret token for APM server connection
+
+If you're not using `SwiftUI` you can alternatively add the same thing to your AppDelegate file:
+
+`AppDelegate.swift`
+
+```swift
+import UIKit
+import iOSAgent
+@main
+class AppDelegate: UIResponder, UIApplicationDelegate {
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
+var config = AgentConfigBuilder()
+ .withServerUrl(URL(string:"http://127.0.0.1:8200")) [^1]
+ .withSecretToken("") [^2]
+
+ Agent.start(with: config)
+ return true
+ }
+}
+```
+[^1]: APM Server URL
+[^2]: Set secret token for APM server connection
+
+
+
+## Instrumentation Configuration
+
+An optional parameter for configuring instrumentation is also available on `Agent.start`:
+
+```swift
+ ...
+
+ let instrumentationConfig = InstrumentationConfigBuilder()
+ .withCrashReporting(true)
+ .build()
+
+ Agent.start(with: config, instrumentationConfig)
+```
+
+
+
+### Configuration Options
+
+
+
+#### `withCrashReporting(_ enable: Bool) -> Self`
+* **Type:** Bool
+* **Default:** true
+
+Toggle for crash reporting. Enabled by default. Since only one crash reporter can be set in iOS, this allows for 3rd party crash reporter preference without conflict.
+
+
+
+#### `withAppMetricInstrumentation(_ enable: Bool) -> Self`
+* **Type:** Bool
+* **Default:** true
+
+Toggles AppMetric instrumentation.
+
+
+
+#### `withURLSessionInstrumentation(_ enable: Bool) -> Self`
+* **Type:** Bool
+* **Default:** true
+
+Toggles network instrumentation.
+
+
+
+#### `withViewControllerInstrumentation(_ enable: Bool) -> Self`
+* **Type:** Bool
+* **Default:** true
+
+Toggles view controller instrumentation.
+
+
+
+#### `withSystemMetrics(_ enable: Bool) -> Self`
+* **Type:** Bool
+* **Default:** true
+
+Toggles metric generation for memory and cpu usage.
+
+
+
+#### `withLifecycleEvents(_ enable: Bool) -> Self`
+* **Type:** Bool
+* **Default:** true
+
+Toggles event generation for lifecycle events.
+
+
+
+## View instrumentation
+
+The agent provides SwiftUI.View and UIViewController instrumentation, where the load time of a View is measured using spans.
+All Views simultaneously loaded will be grouped under the same starting span.
+The spans' names will be dictated by the following rules, from least to highest precedence:
+
+1. ` - view appearing`
+1. ` - view appearing`
+1. The `name` passed to View extension method `reportName(_ name: String) -> View`
+
+The View's class name will be a swift name-mangled string, and is the least desirable naming method. If it's possible, set a navigation title on your views:
+
+`AllProductsList.swift`
+
+```swift
+struct AllProductsList: View {
+ @EnvironmentObject var modelData : ModelData
+
+ var body: some View {
+ VStack {
+ List(modelData.products, id: \.id) { product in
+ AdminProductRow(product: product)
+
+ }
+ }.onAppear {
+ modelData.loadProducts()
+ }.navigationTitle("All Products")
+ }
+}
+```
+
+You'll see "All Products - view appearing" in Kibana.
+
+If it isn't possible to set a navigation title, use `reportName(_ name: String) -> View` to set the name that will show in Kibana:
+
+`AllProductsList.swift`
+
+```swift
+struct AllProductsList: View {
+ @EnvironmentObject var modelData : ModelData
+
+ var body: some View {
+ VStack {
+ List(modelData.products, id: \.id) { product in
+ AdminProductRow(product: product)
+
+ }
+ }.onAppear {
+ modelData.loadProducts()
+ }.reportName("All Products - view appearing")
+ }
+}
+```
+
+
+The entire string `All Products - view appearing` must be inserted to match the default formatting used for the other two naming options.
+
+
+
+
+## MetricKit Instrumentation
+Available for iOS 13 and greater, the agent provides instrumentation of key MetricKit data points:
+
+* Application Launch times
+* Application responsiveness
+* Application exit counts
+
+Technical details on the metric generated can be found in the [Mobile spec](https://github.com/elastic/apm/blob/main/specs/agents/mobile/metrics.md#application-metrics)
+
+
+
+### `application.launch.time`
+This histogram metric provides launch duration broken down by `first draw`, `first draw (optimized)`, and `resumed`. More details about the MetricKit data point can be found in the [Apple documentation](https://developer.apple.com/documentation/metrickit/mxapplaunchmetric).
+
+
+
+### `application.responsiveness.hangtime`
+A histogram of the different durations of time in which the app is too busy to handle user interaction responsively.
+More details about the MetricKit data point can be found in the [Apple documentation](https://developer.apple.com/documentation/metrickit/mxappresponsivenessmetric).
+
+
+
+### `application.exits`
+A count of application exits categorized by various attributes: `foreground` or `background`, and `normal` or abnormal, where abnormal exits are further subdivided.
+More details can be found in the [Apple documentation](https://developer.apple.com/documentation/metrickit/mxappexitmetric).
+
+
+
+## Application Lifecycle Events
+In v0.5.0 the application lifecycle events are automatically instrumented.
+The technical details can be found in the [Mobile spec](https://github.com/elastic/apm/blob/main/specs/agents/mobile/events.md#application-lifecycle-events).
diff --git a/docs/apm-agents-ios-install.mdx b/docs/apm-agents-ios-install.mdx
new file mode 100644
index 0000000000..78e68fbe10
--- /dev/null
+++ b/docs/apm-agents-ios-install.mdx
@@ -0,0 +1,9 @@
+---
+id: serverlessObservabilityApmAgentsIosInstall
+slug: /serverless/observability/apm-agents-ios-install
+title: Install
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+No source content found.
diff --git a/docs/apm-agents-ios-performance-tuning.mdx b/docs/apm-agents-ios-performance-tuning.mdx
new file mode 100644
index 0000000000..4216cc577f
--- /dev/null
+++ b/docs/apm-agents-ios-performance-tuning.mdx
@@ -0,0 +1,9 @@
+---
+id: serverlessObservabilityApmAgentsIosPerformanceTuning
+slug: /serverless/observability/apm-agents-ios-performance-tuning
+title: Performance tuning
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+No source content found.
diff --git a/docs/apm-agents-ios-supported-technologies.mdx b/docs/apm-agents-ios-supported-technologies.mdx
new file mode 100644
index 0000000000..3a0ecdb34f
--- /dev/null
+++ b/docs/apm-agents-ios-supported-technologies.mdx
@@ -0,0 +1,16 @@
+---
+id: serverlessObservabilityApmAgentsIosSupportedTechnologies
+slug: /serverless/observability/apm-agents-ios-supported-technologies
+title: Supported technologies
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+
+The Elastic APM iOS Agent automatically instruments various APIs, frameworks, and application servers. This section lists all supported technologies.
+
+| Framework | Version |
+|---|---|
+| OpenTelemetry-Swift | 1.4.1 |
diff --git a/docs/apm-agents-ios.mdx b/docs/apm-agents-ios.mdx
new file mode 100644
index 0000000000..453e250fba
--- /dev/null
+++ b/docs/apm-agents-ios.mdx
@@ -0,0 +1,51 @@
+---
+id: serverlessObservabilityApmAgentsIos
+slug: /serverless/observability/apm-agents-ios
+title: iOS
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+
+The Elastic APM iOS Agent measures the performance of your mobile applications in real-time.
+
+
+
+## How does the agent work?
+The Elastic APM iOS Agent uses the [OpenTelemetry-Swift SDK](https://github.com/open-telemetry/opentelemetry-swift).
+The agent automatically traces URLSessions and provides distributed traces annotated with device information along
+with your back-end services instrumented with Open-Telemetry.
+
+The agent also captures any custom open-telemetry traces or measurements created using the OpenTelemetry-Swift API.
+
+
+
+## How to add instrumentation
+This agent will configure the OpenTelementry-Swift `TracerProvider` and `MetricProvider`, and set them as the global OpenTelemetry providers. They can be accessed through the OpenTelemetry SDK as follows:
+
+```swift
+let tracerProvider = OpenTelemetry.instance.tracerProvider
+let meterProvider = OpenTelemetry.instance.meterProvider
+```
+
+These objects can be used to acquire new tracers and meters that will send their captured data to the Elastic APM Server. More details on how to use OpenTelemetry to instrument your app can be found in the [OpenTelemetry.io Swift manual instrumentation docs](https://opentelemetry.io/docs/instrumentation/swift/manual).
+
+Examples can be found in [opentelemetry-swift/examples](https://github.com/open-telemetry/opentelemetry-swift/tree/main/Examples).
+
+
+
+## Additional components
+APM Agents work in conjunction with the [APM Server](((apm-guide-ref))/index.html), [((es))](((ref))/index.html), and [((kib))](((kibana-ref))/index.html).
+The [APM Guide](((apm-guide-ref))/index.html) provides details on how these components work together,
+and provides a matrix outlining [Agent and Server compatibility](((apm-guide-ref))/agent-server-compatibility.html).
+
+## Open Telemetry Components
+The iOS Agent utilizes several OpenTelemetry-Swift libraries to provide automatic instrumentation of your applications and services. Details about these instrumentation libraries can be found in the official [opentelementry.io Swift Libraries documentation](https://opentelemetry.io/docs/instrumentation/swift/libraries/).
+
+For network instrumentation, the agent uses `NSURLSessionInstrumentation`. This provides network instrumentation in the form of spans and enables distributed tracing for all instrumented downstream services.
+
+Detailed information on the device, operating system, and application is provided by `SDKResourceExtension`. More information on which data points are captured can be found in the [opentelementry.io SDKResourceExtension documentation](https://opentelemetry.io/docs/instrumentation/swift/manual/#SDKResourceExtension).
+
+Elastic maps OpenTelemetry attributes to Elastic-specific fields. Details of these mappings can be found in the [Elastic Mobile Agent Spec](https://github.com/elastic/apm/tree/main/specs/agents/mobile).
diff --git a/docs/apm-agents-java-api.mdx b/docs/apm-agents-java-api.mdx
new file mode 100644
index 0000000000..54399b59e8
--- /dev/null
+++ b/docs/apm-agents-java-api.mdx
@@ -0,0 +1,62 @@
+---
+id: serverlessObservabilityApmAgentsJavaApi
+slug: /serverless/observability/apm-agents-java-api
+title: API
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+export let env_github = false
+
+
+
+
+For the best reading experience,
+please view this documentation at [elastic.co](https://www.elastic.co/guide/en/apm/agent/java)
+
+
+
+
+
+
+There are three different ways enhance the out-of-the-box instrumentation of the Java agent with manual instrumentation:
+
+1. {/* Public API */}
+ A simple and stable API that is most native to the agent.
+ Contains annotations to declaratively create spans.
+
+1. {/* OpenTelemetry bridge */}
+ A vendor neutral API.
+ If you plan to do a lot of manual instrumentation and want to reduce vendor lock-in this is probably what you're looking for.
+
+1. {/* OpenTracing bridge */}
+ A vendor neutral API that is discontinued in favor of OpenTelemetry.
+
+A further option is the {/* plugin api */} which uses the OpenTelemetry API and allows you to add in custom instrumentation without modifying the application.
+
+
+
+## Operation Modes
+
+All APIs allow for different operation modes in combination with the Elastic APM agent
+
+Noop
+ : If the agent is not installed, the APIs are in noop mode and do not actually record and report spans.
+
+ Mix and Match
+
+ If you want to leverage the auto instrumentation of Elastic APM,
+ but also want to create custom spans or use the API to add custom labels to the spans created by Elastic APM,
+ you can just do that.
+
+ Manual instrumentation
+
+ If you don't want Elastic APM to auto-instrument known frameworks,
+ but instead only rely on manual instrumentation,
+ disable the auto instrumentation setting the configuration option {/* `instrument` */} to `false`.
+
+{/* The include that was here is another page */}
+{/* The include that was here is another page */}
+{/* The include that was here is another page */}
diff --git a/docs/apm-agents-java-configure.mdx b/docs/apm-agents-java-configure.mdx
new file mode 100644
index 0000000000..227f1d9d81
--- /dev/null
+++ b/docs/apm-agents-java-configure.mdx
@@ -0,0 +1,161 @@
+---
+id: serverlessObservabilityApmAgentsJavaConfigure
+slug: /serverless/observability/apm-agents-java-configure
+title: Configure
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+
+{/* This file is auto generated. Please make your changes in *Configuration.java (for example CoreConfiguration.java) and execute ConfigurationExporter */}
+
+
+
+## `circuit_breaker_enabled` (1.14.0 performance)
+
+A boolean specifying whether the circuit breaker should be enabled or not.
+When enabled, the agent periodically polls stress monitors to detect system/process/JVM stress state.
+If ANY of the monitors detects a stress indication, the agent will become inactive, as if the
+{/* `recording` */} configuration option has been set to `false`, thus reducing resource consumption to a minimum.
+When inactive, the agent continues polling the same monitors in order to detect whether the stress state
+has been relieved. If ALL monitors approve that the system/process/JVM is not under stress anymore, the
+agent will resume and become fully functional.
+
+Dynamic
+
+| Default | Type | Dynamic |
+|---|---|---|
+| `false` | Boolean | true |
+
+| Java System Properties | Property file | Environment |
+|---|---|---|
+| `elastic.apm.circuit_breaker_enabled` | `circuit_breaker_enabled` | `ELASTIC_APM_CIRCUIT_BREAKER_ENABLED` |
+
+{/* This file is auto generated. Please make your changes in *Configuration.java (for example CoreConfiguration.java) and execute ConfigurationExporter */}
+
+
+
+## `stress_monitoring_interval` (performance)
+
+The interval at which the agent polls the stress monitors. Must be at least `1s`.
+
+Supports the duration suffixes `ms`, `s` and `m`.
+Example: `5s`.
+
+| Default | Type | Dynamic |
+|---|---|---|
+| `5s` | TimeDuration | false |
+
+| Java System Properties | Property file | Environment |
+|---|---|---|
+| `elastic.apm.stress_monitoring_interval` | `stress_monitoring_interval` | `ELASTIC_APM_STRESS_MONITORING_INTERVAL` |
+
+{/* This file is auto generated. Please make your changes in *Configuration.java (for example CoreConfiguration.java) and execute ConfigurationExporter */}
+
+
+
+## `stress_monitor_gc_stress_threshold` (performance)
+
+The threshold used by the GC monitor to rely on for identifying heap stress.
+The same threshold will be used for all heap pools, so that if ANY has a usage percentage that crosses it,
+the agent will consider it as a heap stress. The GC monitor relies only on memory consumption measured
+after a recent GC.
+
+Dynamic
+
+| Default | Type | Dynamic |
+|---|---|---|
+| `0.95` | Double | true |
+
+| Java System Properties | Property file | Environment |
+|---|---|---|
+| `elastic.apm.stress_monitor_gc_stress_threshold` | `stress_monitor_gc_stress_threshold` | `ELASTIC_APM_STRESS_MONITOR_GC_STRESS_THRESHOLD` |
+
+{/* This file is auto generated. Please make your changes in *Configuration.java (for example CoreConfiguration.java) and execute ConfigurationExporter */}
+
+
+
+## `stress_monitor_gc_relief_threshold` (performance)
+
+The threshold used by the GC monitor to rely on for identifying when the heap is not under stress .
+If `stress_monitor_gc_stress_threshold` has been crossed, the agent will consider it a heap-stress state.
+In order to determine that the stress state is over, percentage of occupied memory in ALL heap pools should
+be lower than this threshold. The GC monitor relies only on memory consumption measured after a recent GC.
+
+Dynamic
+
+| Default | Type | Dynamic |
+|---|---|---|
+| `0.75` | Double | true |
+
+| Java System Properties | Property file | Environment |
+|---|---|---|
+| `elastic.apm.stress_monitor_gc_relief_threshold` | `stress_monitor_gc_relief_threshold` | `ELASTIC_APM_STRESS_MONITOR_GC_RELIEF_THRESHOLD` |
+
+{/* This file is auto generated. Please make your changes in *Configuration.java (for example CoreConfiguration.java) and execute ConfigurationExporter */}
+
+
+
+## `stress_monitor_cpu_duration_threshold` (performance)
+
+The minimal time required in order to determine whether the system is
+either currently under stress, or that the stress detected previously has been relieved.
+All measurements during this time must be consistent in comparison to the relevant threshold in
+order to detect a change of stress state. Must be at least `1m`.
+
+Dynamic
+
+Supports the duration suffixes `ms`, `s` and `m`.
+Example: `1m`.
+
+| Default | Type | Dynamic |
+|---|---|---|
+| `1m` | TimeDuration | true |
+
+| Java System Properties | Property file | Environment |
+|---|---|---|
+| `elastic.apm.stress_monitor_cpu_duration_threshold` | `stress_monitor_cpu_duration_threshold` | `ELASTIC_APM_STRESS_MONITOR_CPU_DURATION_THRESHOLD` |
+
+{/* This file is auto generated. Please make your changes in *Configuration.java (for example CoreConfiguration.java) and execute ConfigurationExporter */}
+
+
+
+## `stress_monitor_system_cpu_stress_threshold` (performance)
+
+The threshold used by the system CPU monitor to detect system CPU stress.
+If the system CPU crosses this threshold for a duration of at least `stress_monitor_cpu_duration_threshold`,
+the monitor considers this as a stress state.
+
+Dynamic
+
+| Default | Type | Dynamic |
+|---|---|---|
+| `0.95` | Double | true |
+
+| Java System Properties | Property file | Environment |
+|---|---|---|
+| `elastic.apm.stress_monitor_system_cpu_stress_threshold` | `stress_monitor_system_cpu_stress_threshold` | `ELASTIC_APM_STRESS_MONITOR_SYSTEM_CPU_STRESS_THRESHOLD` |
+
+{/* This file is auto generated. Please make your changes in *Configuration.java (for example CoreConfiguration.java) and execute ConfigurationExporter */}
+
+
+
+## `stress_monitor_system_cpu_relief_threshold` (performance)
+
+The threshold used by the system CPU monitor to determine that the system is
+not under CPU stress. If the monitor detected a CPU stress, the measured system CPU needs to be below
+this threshold for a duration of at least `stress_monitor_cpu_duration_threshold` in order for the
+monitor to decide that the CPU stress has been relieved.
+
+Dynamic
+
+| Default | Type | Dynamic |
+|---|---|---|
+| `0.8` | Double | true |
+
+| Java System Properties | Property file | Environment |
+|---|---|---|
+| `elastic.apm.stress_monitor_system_cpu_relief_threshold` | `stress_monitor_system_cpu_relief_threshold` | `ELASTIC_APM_STRESS_MONITOR_SYSTEM_CPU_RELIEF_THRESHOLD` |
+
diff --git a/docs/apm-agents-java-get-started.mdx b/docs/apm-agents-java-get-started.mdx
new file mode 100644
index 0000000000..1d43553dab
--- /dev/null
+++ b/docs/apm-agents-java-get-started.mdx
@@ -0,0 +1,121 @@
+---
+id: serverlessObservabilityApmAgentsJavaGetStarted
+slug: /serverless/observability/apm-agents-java-get-started
+title: Get started
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+{/* import AwsLambdaRuntimes from './transclusion/supported-technologies/aws-lambda-runtimes.mdx' */}
+{/* import LambdaSelectorLambdaAttributesSelector from '../../lambda/transclusion/lambda-selector/lambda-attributes-selector.mdx' */}
+{/* import LambdaSelectorExtensionArnReplacement from '../../lambda/transclusion/lambda-selector/extension-arn-replacement.mdx' */}
+{/* import LambdaJavaArnReplacement from './transclusion/lambda/java-arn-replacement.mdx' */}
+{/* import AddExtensionLayerWidget from '../../lambda/transclusion/add-extension/add-extension-layer-widget.mdx' */}
+{/* import LambdaConfigureLambdaWidget from './transclusion/lambda/configure-lambda-widget.mdx' */}
+
+
+
+export let layer_section_type = "with-agent"
+
+The Java APM Agent can be used with AWS Lambda to monitor the execution of your AWS Lambda functions.
+
+
+
+## Quick Start
+
+To get started with APM for your Java AWS Lambda functions, follow the steps below.
+
+
+
+### Prerequisites
+
+1. You need an APM Server to send APM data to. Follow the [APM Quick start](((apm-guide-ref))/apm-quick-start.html) if you have not set one up yet. For the best-possible performance, we recommend setting up APM on ((ecloud)) in the same AWS region as your AWS Lambda functions.
+1. Make sure you are using one of the supported AWS Lambda Java runtimes:
+
+ {/* */}
+
+### Step 1: Select the AWS Region and Architecture
+
+{/* */}
+
+### Step 2: Add the APM Layers to your Lambda function
+
+{/* */}
+
+{/* */}
+
+Both the [((apm-lambda-ext))](((apm-lambda-ref))/aws-lambda-arch.html) and the Java APM Agent are added to your Lambda function as [AWS Lambda Layers](https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html). Therefore, you need to add the corresponding Layer ARNs (identifiers) to your Lambda function.
+
+{/* */}
+
+### Step 3: Configure APM on AWS Lambda
+
+The ((apm-lambda-ext)) and the APM Java agent are configured through environment variables on the AWS Lambda function.
+
+For the minimal configuration, you will need the _APM Server URL_ to set the destination for APM data and an [_APM Secret Token_](((apm-guide-ref))/secret-token.html).
+If you prefer to use an [APM API key](((apm-guide-ref))/api-key.html) instead of the APM secret token, use the `ELASTIC_APM_API_KEY` environment variable instead of `ELASTIC_APM_SECRET_TOKEN` in the following configuration.
+
+For production environments, we recommend [using the AWS Secrets Manager to store your APM authentication key](((apm-lambda-ref))/aws-lambda-secrets-manager.html) instead of providing the secret value as plaintext in the environment variables.
+
+{/* */}
+\<1> The [`ELASTIC_APM_SEND_STRATEGY`](((apm-lambda-ref))/aws-lambda-config-options.html#_elastic_apm_send_strategy) defines when APM data is sent to your Elastic APM backend. To reduce the execution time of your lambda functions, we recommend to use the `background` strategy in production environments with steady load scenarios.
+
+You can optionally fine-tune the Java agent or the [configuration of the ((apm-lambda-ext))](((apm-lambda-ref))/aws-lambda-config-options.html).
+
+That's it; After following the steps above, you're ready to go!
+Your Lambda function invocations should be traced from now on.
+
+Read on to learn more about the features and limitations of the Java APM Agent on AWS Lambda Functions.
+
+
+
+## Features and Caveats
+
+The AWS Lambda as a runtime behaves differently from conventional runtimes.
+While most APM and monitoring concepts apply to AWS Lambda, there are a few differences and limitations to be aware of.
+
+
+
+### Performance monitoring
+
+Elastic APM automatically measures the performance of your lambda function executions.
+It records traces for database queries, external HTTP requests,
+and other slow operations that happen during execution.
+
+By default, the agent will trace the usual supported technologies.
+To trace other events, take a look at {/* additional method tracing options */}, however note that
+due to its asynchronous nature, the {/* Sampling Profiler */} is not a valid option for AWS Lambda.
+
+
+
+### Error monitoring
+
+Whenever an `Exception` is thrown by your function handler method, the agent will send an error event to the APM Server
+and the corresponding transaction will be recorded as a failed transaction.
+Errors related to traced spans will be sent as well.
+
+
+
+### Caveats
+* System and custom metrics are not collected for Lambda functions. This is both because most of those are irrelevant
+ and because the interval-based event sending model is not suitable for FaaS environments.
+
+* Cold starts can be significantly slower when the agent is installed. If this is an issue, following are ways to deal with slow code
+ starts:
+
+ * If the only issue with slower cold starts is Lambda timing out, consider increasing the configured timeout.
+ * The higher memory limit you would allow for your Function, the smaller this effect would be. This is irrelevant for
+ subsequent Function invocations, it is only relevant for cold starts.
+
+ * Much of the startup delay is related to the amount of enabled instrumentations. An enabled instrumentation will contribute to this
+ overhead regardless of it being applicable for your specific Lambda function. You can considerably reduce the related overhead by
+ specifying a limited list of enabled instrumentations through the {/* `enable_instrumentations` */} config.
+ An automatic way to generate such list is by invoking your Lambda with the agent's default configurations and a {/* */} of `INFO` or lower. After the first lambda invocation, the agent would log a message with the following format: `Used
+ instrumentation groups: [aws-lambda, executor, executor-collection, fork-join, ssl-context, urlconnection]`.
+
+* The {/* Sampling Profiler */} feature would not work because it relies on profiling sessions and
+ subsequent asynchronous processing of the collected data.
+
diff --git a/docs/apm-agents-java-install.mdx b/docs/apm-agents-java-install.mdx
new file mode 100644
index 0000000000..3c494fb579
--- /dev/null
+++ b/docs/apm-agents-java-install.mdx
@@ -0,0 +1,9 @@
+---
+id: serverlessObservabilityApmAgentsJavaInstall
+slug: /serverless/observability/apm-agents-java-install
+title: Install
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+No source content found.
diff --git a/docs/apm-agents-java-performance-tuning.mdx b/docs/apm-agents-java-performance-tuning.mdx
new file mode 100644
index 0000000000..d27f090134
--- /dev/null
+++ b/docs/apm-agents-java-performance-tuning.mdx
@@ -0,0 +1,163 @@
+---
+id: serverlessObservabilityApmAgentsJavaPerformanceTuning
+slug: /serverless/observability/apm-agents-java-performance-tuning
+title: Performance tuning
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+
+* Agent overhead
+* Tuning the Agent Startup
+* Tuning the Agent
+* Circuit Breaker
+
+
+
+## Agent overhead
+
+Any APM Agent will impose overhead.
+Here are a few different areas where that overhead might be seen.
+
+### Latency
+
+Great care is taken to keep code on critical paths as lightweight as possible.
+For example, the actual reporting of events is done on a background thread.
+
+It is very important that both the average latency, and higher percentiles of latency are low.
+That's because a low average latency means nothing if 1% of your requests experiences very poor performance.
+The main sources of spikes in higher latencies are garbage collection pauses and contended locks.
+
+We take great care to minimize the memory allocations we do in the Java agent as much as possible.
+For example, instead of allocating new objects, we take them from an object pool and return them to the pool when they are not used anymore.
+More details on this process can be found [here](https://github.com/elastic/apm-agent-java/blob/main/apm-agent-core/README.md#lifecycle).
+When it comes to reporting the recorded events,
+we directly serialize them into the output stream of the request to the APM server while only relying on reusable buffers.
+This way we can report events without allocating any objects.
+We do all that in order to not add additional work for the GC which is already busy cleaning up the memory your application is allocating.
+
+The Java agent also uses specialized data structures (LMAX Disruptor and queues from JCTools)
+when we transfer events across threads.
+For example, from the application threads which record transactions to the background reporter thread.
+This is to circumvent problems like lock contention and false sharing you would get from standard JDK data structures like `ArrayBlockingQueue`.
+
+In single-threaded benchmarks,
+our Java agent imposes an overhead in the order of single-digit microseconds (µs) up to the 99.99th percentile.
+The benchmarks were run on a Linux machine with an i7-7700 (3.60GHz) on Oracle JDK 10.
+We are currently working on multi-threaded benchmarks.
+When disabling header recording, the agent allocates less than one byte for recording an HTTP request and one JDBC (SQL) query,
+including reporting those events in the background to the APM Server.
+
+### CPU
+
+Even though the Agent does most of its work in the background, serializing and compressing events,
+along with sending them to the APM Server does actually also add a bit of CPU overhead.
+If your application is not CPU bound, this shouldn’t matter much.
+Your application is probably not CPU bound if you do (blocking) network I/O,
+like communicating with databases or external services.
+
+In a scenario where APM Server can’t handle all of the events,
+the Agent will drop data so as to not crash your application.
+
+### Memory
+
+Unless you have really small heaps,
+you usually don't have to increase the heap size for the Java Agent.
+It has a fairly small and static memory overhead for the object pools, and some small buffers in the order of a couple of megabytes.
+
+### Network
+
+The Agent requires some network bandwidth, as it needs to send recorded events to the APM server.
+This is where it's important to know how many requests your application handles and how many of those you want to record and store.
+This can be adjusted with the Sample rate.
+
+
+
+## Tuning the Agent Startup
+
+When the Java agent starts, it needs to initialize various components of the agent, connect
+to the APM server, and instrument any already loaded classes that it has been configured to
+trace. This takes some time and resources, and if done synchronously on the main thread (which is
+the default when using `-javaagent`) will delay the start of the application until complete.
+
+We provide several options to tune the startup, targeted at three startup use cases:
+
+1. Immediate synchronous agent start
+ The application needs to have instrumentation immediately applied, regardless of startup
+ time cost - typically because you don't want to miss any traces/transactions right from the
+ beginning of the application, or some types of actions only happen at initialization and need
+ to be instrumented before the first instance is created (such as setting up Prepared Statements).
+ In this use case, use the `-javaagent` command-line flag as per {/* Manual setup with `-javaagent` flag */}
+
+1. Fastest start (asynchronously)
+ The application can accept instrumentation missing before the application starts
+ and also accept missing some initial traces and transactions.
+ In this use case you can attach to the application after startup with {/* Automatic setup with `apm-agent-attach-cli.jar` */}
+ or if you are using the `-javaagent` command-line flag you can start the agent asynchronously
+ by setting the `elastic.apm.start_async` property (since 1.29.0), eg `java -Delastic.apm.start_async ...`
+ (you can use `elastic.apm.delay_agent_premain_ms=0` in earlier versions)
+
+1. Minimized synchronous start
+ The application needs to have instrumentation immediately applied, but needs to minimize the
+ time before the application starts. This requires some tradeoff: in order to reduce the
+ synchronous startup time, the number of instrumentations applied needs to be minimized
+ through the `enable_instrumentations` option.
+ In this use case you should identify the smallest set of instrumentation groups you can
+ accept for your application monitoring, and use the `enable_instrumentations` configuration
+ option detailed in the configuration guide. The smallest set of instrumentations
+ can be found in the agent logs after normal termination of the application (since version 1.29.0).
+ In addition to that you can run the agent with logging level set to DEBUG, and view the statistics
+ produced by the agent on normal termination of the application.
+
+
+
+## Tuning the Agent
+
+The Java agent offers a variety of configuration options,
+some of which can have a significant impact on performance.
+To make it easy to determine which options impact performance,
+we've tagged certain configuration options in the documentation with _(performance)_.
+
+
+
+### Sample rate
+
+_Sample rate_ is the percentage of requests which should be recorded and sent to the APM Server.
+(For pre-8.0 servers, unsampled requests are sent without contextual information which reduces
+transfer and storage sizes; from 8.0 unsampled requests are not sent at all.)
+What is an ideal sample rate? Unfortunately, there's no one-size-fits-all answer to that question.
+Sampling comes down to your preferences and your application.
+The more you want to sample, the more network bandwidth and disk space you’ll need.
+
+It’s important to note that the latency of an application won’t be affected much by the agent,
+even if you sample at 100%.
+However, the background reporter thread has some work to do when serializing and gzipping events.
+
+The sample rate can be changed by altering the {/* `transaction_sample_rate` (performance) */}.
+
+### Stack trace collection
+
+If a span, e.g., a captured JDBC query, takes longer than 5ms,
+we capture the stack trace so that you can easily find the code path which lead to the query.
+Stack traces can be quite long, taking up bandwidth and disk space, and also requiring object allocations.
+But because we are processing the stack trace asynchronously, it adds very little latency.
+Upping the {/* `span_stack_trace_min_duration` (performance) */} or disabling stack trace collection altogether can gain you a bit of performance if needed.
+
+### Recording headers and cookies
+
+By default, the Java agent records all request and response headers, including cookies.
+Disabling {/* `capture_headers` (performance) */} can save allocations, network bandwidth, and disk space.
+
+
+
+## Circuit Breaker
+
+When enabled, the agent periodically polls stress monitors to detect system/process/JVM stress state.
+If ANY of the monitors detects a stress indication, the agent will become inactive, as if the
+{/* `recording` */} configuration option has been set to `false`, thus reducing resource consumption to a minimum.
+When inactive, the agent continues polling the same monitors in order to detect whether the stress state
+has been relieved. If ALL monitors approve that the system/process/JVM is not under stress anymore, the
+agent will resume and become fully functional.
+For fine-grained Circuit Breaker configurations please refer to {/* Circuit-Breaker configuration options */}.
diff --git a/docs/apm-agents-java-supported-technologies.mdx b/docs/apm-agents-java-supported-technologies.mdx
new file mode 100644
index 0000000000..281d13d434
--- /dev/null
+++ b/docs/apm-agents-java-supported-technologies.mdx
@@ -0,0 +1,650 @@
+---
+id: serverlessObservabilityApmAgentsJavaSupportedTechnologies
+slug: /serverless/observability/apm-agents-java-supported-technologies
+title: Supported technologies
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+{/* import AwsLambdaRuntimes from './transclusion/supported-technologies/aws-lambda-runtimes.mdx' */}
+
+
+
+The Elastic APM Java Agent automatically instruments various APIs,
+frameworks and application servers.
+This section lists all supported technologies.
+
+* Java versions
+* Web Frameworks
+* Application Servers/Servlet Containers
+* Data Stores
+* Networking frameworks
+* Asynchronous frameworks
+* Messaging frameworks
+* Scheduling frameworks
+* Logging frameworks
+* Process frameworks
+* RPC frameworks
+* AWS Lambda runtimes
+* Java method monitoring
+* Metrics
+* Caveats
+
+If your favorite technology is not supported yet,
+you can vote for it by participating in our
+[survey](https://docs.google.com/forms/d/e/1FAIpQLScd0RYiwZGrEuxykYkv9z8Hl3exx_LKCtjsqEo1OWx8BkLrOQ/viewform?usp=sf_link).
+We will use the results to add support for the most requested technologies.
+
+Other options are to add a dependency to the agent's {/* public API */}
+in order to programmatically create custom transactions and spans, or to create
+your own {/* plugin */} that will instrument the technology you want instrumented.
+
+If you want to extend the auto-instrumentation capabilities of the agent,
+the [contributing guide](https://github.com/elastic/apm-agent-java/blob/main/CONTRIBUTING.md) should get you started.
+
+
+If, for example,
+the HTTP client library of your choice is not listed,
+it means that there won't be spans for those outgoing HTTP requests.
+If the web framework you are using is not supported,
+the agent does not capture transactions.
+
+
+
+
+## Java versions
+
+
+As of version 1.33.0, Java 7 support is deprecated and will be removed in a future release
+
+
+| Vendor | Supported versions | Notes |
+|---|---|---|
+| Oracle JDK | 7u60+*, 8u40+, 9, 10, 11, 17, 20 | `--module-path` has not been tested yet |
+| OpenJDK | 7u60+*, 8u40+, 9, 10, 11, 17, 20 | `--module-path` has not been tested yet |
+| IBM J9 VM | 8 service refresh 5+ (build 2.9 or 8.0.5.0) | {/* Sampling profiler */} is not supported |
+| HP-UX JVM | 7.0.10+*, 8.0.02+ | |
+| SAP JVM | 8.1.065+ | |
+
+\* Java 7 support is deprecated and will be removed in a future release
+
+**Early Java 8 and Java 7**
+
+Early Java 8 versions before update 40 are **not supported** because they have
+several bugs that might result in JVM crashes when a java agent is active,
+thus agent **will not start** on those versions.
+Similarly, Java 7 versions before update 60 are not supported as they are buggy in regard to invokedynamic.
+
+Here is an example of the message displayed when this happens.
+```
+Failed to start agent - JVM version not supported: 1.8.0_31 Java HotSpot(TM) 64-Bit Server VM 25.31-b07.
+To override Java version verification, set the 'elastic.apm.disable_bootstrap_checks' System property,
+or the `ELASTIC_APM_DISABLE_BOOTSTRAP_CHECKS` environment variable, to 'true'.
+```
+
+As this message states, you can disable this check if required by adding `-Delastic.apm.disable_bootstrap_checks=true` to
+the JVM arguments, or setting `ELASTIC_APM_DISABLE_BOOTSTRAP_CHECKS=true` for the JVM environment variables.
+
+
+
+## Web Frameworks
+| Framework | Supported versions | Description | Since |
+|---|---|---|---|
+| Servlet API | 3+ | A transaction will be created for all incoming HTTP requests to your Servlet API-based application. Starting in version 1.18.0, additional spans are created if the servlet dispatches execution to another servlet through the `forward` or `include` APIs, or to an error page. See also Application Servers/Servlet Containers | 1.0.0, 4.0+ (`jakarta.servlet`) since 1.28.0 |
+| Spring Web MVC | 4.x, 5.x, 6.x | If you are using Spring MVC (for example with Spring Boot), the transactions are named based on your controllers (`ControllerClass#controllerMethod`). | 1.0.0, 6.x since 1.38.0 |
+| Spring Webflux | 5.2.3+ | Creates transactions for incoming HTTP requests, supports annotated and functional endpoints. | 1.24.0 (experimental), 1.34.0 (GA) |
+| JavaServer Faces | 2.2.x, 2.3.x, 3.0.x | If you are using JSF, transactions are named based on the requested Facelets and spans are captured for visibility into execution and rendering | 1.0.0, `jakarta.faces` since 1.28.0 |
+| Spring Boot | 1.5+, 2.x, 3.x | Supports embedded Tomcat, Jetty and Undertow | 1.0.0, 3.x since 1.38.0 |
+| JAX-RS | 2.x, 3.x | The transactions are named based on your resources (`ResourceClass#resourceMethod`). Note that only the packages configured in {/* `application_packages` */} are scanned for JAX-RS resources. If you don't set this option, all classes are scanned. This comes at the cost of increased startup times, however. |
+| JAX-WS | | The transactions are named based on your `@javax.jws.WebService`, `@jakarta.jws.WebService` annotated classes and `@javax.jws.WebMethod`, `@jakarta.jws.WebMethod` annotated method names (`WebServiceClass#webMethod`). Note that only the packages configured in {/* `application_packages` */} are scanned for JAX-WS resources. If you don't set this option, all classes are scanned. This comes at the cost of increased startup times, however. |
+| Grails | 3+ | | 1.17.0 |
+| Apache Struts | 2.x | The transactions are named based on your action (`ActionClass#actionMethod`). | 1.24.0 |
+| Vert.x Web | 3.6+ | Captures incoming HTTP requests as transactions | 1.24.0 (experimental) |
+| Sparkjava (not Apache Spark) | 2.x | The transactions are named based on your route (`GET /foo/:bar`). | 1.25.0 |
+| com.sun.net.httpserver.HttpServer | 1.7+ | Captures incoming HTTP requests as transactions | 1.25.0 |
+| Javalin | 3.13.8+ | | 1.25.0 |
+| Java API for WebSocket | 1.0 | Captures methods annotated with `@OnOpen`, `@OnMessage`, `@OnError`, or `@OnClose` as transactions for classes that are annotated with `@ServerEndpoint`. | 1.29.0 |
+
+
+
+## Application Servers/Servlet Containers
+The Elastic APM Java agent has generic support for the Servlet API 3+.
+However, some servers require special handling.
+The servers listed here are tested by an integration test suite to make sure Elastic APM is compatible with them.
+Other Servlet 3+ compliant servers will most likely work as well.
+
+| Server | Supported versions |
+|---|---|
+| {/* Tomcat */} | 7.x, 8.5.x, 9.x, 10.x |
+| {/* WildFly */} | 8+ |
+| {/* JBoss EAP */} | 6.4, 7.0, 7.1, 7.2 |
+| {/* Jetty */} (only the `ServletContextHandler` is supported) | 9.2, 9.3, 9.4 |
+| {/* WebSphere Liberty */} | 8.5.5, 18.0.x |
+| {/* Undertow Servlet */} | 1.4 |
+| {/* Payara */} | 4.x, 5.x |
+| {/* Oracle WebLogic */} | 12.2 |
+
+
+
+## Data Stores
+| Database | Supported versions | Description | Since |
+|---|---|---|---|
+| JDBC | 4.1+ | The agent automatically creates DB spans for all your JDBC queries. This includes JDBC queries executed by O/R mappers like Hibernate. |
+| Elasticsearch Java REST and API clients | 5.0.2+ | The agent automatically creates Elasticsearch spans for queries done through the official REST client. | 1.0.0, async since 1.5.0, API Client since 1.32.0 |
+| Hibernate Search | 5.x (on by default), 6.x (off by default) | The agent automatically creates Hibernate Search spans for queries done through the Hibernate Search API. |
+| Redis Jedis | 1.4.0-4.x | The agent creates spans for interactions with the Jedis client. | 1.10.0, 4.x since 1.31.0 |
+| Redis Lettuce | 3.4+ | The agent creates spans for interactions with the Lettuce client. | 1.13.0 |
+| Redis Redisson | 2.1.5+ | The agent creates spans for interactions with the Redisson client. | 1.15.0 |
+| MongoDB driver | 3.x | The agent creates spans for interactions with the MongoDB driver. At the moment, only the synchronous driver (mongo-java-driver) is supported. The asynchronous and reactive drivers are currently not supported. |
+| MongoDB Sync Driver | 4.x | The agent creates spans for interactions with the MongoDB 4.x sync driver. This provides support for `org.mongodb:mongodb-driver-sync` | 1.34.0 |
+| Cassandra | 2.x+ | | 1.23.0 |
+| AWS DynamoDB | 1.x, 2.x | The agent creates spans for interactions with the AWS DynamoDb service through the AWS Java SDK. | 1.31.0 |
+| AWS S3 | 1.x, 2.x | The agent creates spans for interactions with the AWS S3 service through the AWS Java SDK. | 1.31.0 |
+
+
+
+## Networking frameworks
+Distributed tracing will only work if you are using one of the supported networking frameworks.
+
+For the supported HTTP libraries, the agent automatically creates spans for outgoing HTTP requests and propagates tracing headers.
+The spans are named after the schema ``, for example `GET elastic.co`.
+
+| Framework | Supported versions | Note | Since |
+|---|---|---|---|
+| Apache HttpClient | 4.3+ | | 0.7.0 (4.3+) 1.8.0 (4.0+) |
+| Apache HttpClient (Legacy) | 3.0+ | Requires setting {/* `instrument_ancient_bytecode` */} to `true` | 1.35.0 |
+| Apache HttpAsyncClient | 4.0+ | | 1.6.0 |
+| Spring RestTemplate | 3.1.1+ | | 0.7.0 |
+| OkHttp | 2, 3, 4 (4.4+ since 1.22.0) | | 1.4.0 (synchronous calls via `Call#execute()`) 1.5.0 (async calls via `Call#enquene(Callback)`) |
+| HttpUrlConnection | | | 1.4.0 |
+| JAX-WS client | | JAX-WS clients created via [`javax.xml.ws.Service`](https://docs.oracle.com/javaee/7/api/javax/xml/ws/Service.html) inherently support context propagation as they are using `HttpUrlConnection` underneath. | 1.4.0 |
+| AsyncHttpClient | 2.x | | 1.7.0 |
+| Apache Dubbo | 2.5+, except for 2.7.0, 2.7.1, and 2.7.2 | | 1.17.0 |
+| JDK 11 HttpClient | | | 1.18.0 |
+| Vert.x WebClient | 3.6+ | | 1.25.0 |
+| Spring Webclient | 5.2.3+ | | 1.33.0 (experimental), 1.34.0 (GA) |
+| Finagle Http Client | 22+ | | 1.35.0 |
+| LdapClient | | | 1.36.0 |
+
+
+
+## Asynchronous frameworks
+When a Span is created in a different Thread than its parent,
+the trace context has to be propagated onto this thread.
+
+This section lists all supported asynchronous frameworks.
+
+
+
+
+ `ExecutorService`
+
+
+
+
+
+
+
+ The agent propagates the context for `ExecutorService` s.
+
+
+
+ 1.4.0
+
+
+
+
+
+
+ `ScheduledExecutorService`
+
+
+
+
+
+
+
+ The agent propagates the context for `ScheduledExecutorService#schedule` (this does not include `scheduleAtFixedRate` or `scheduleWithFixedDelay`.
+
+
+
+ 1.17.0
+
+
+
+
+
+
+ `ForkJoinPool`
+
+
+
+
+
+
+
+ The agent propagates the context for `ForkJoinPool` s.
+
+
+
+ 1.17.0
+
+
+
+
+
+
+ Scala Future
+
+
+
+ 2.13.x
+
+
+
+ The agent propagates the context when using the `scala.concurrent.Future` or `scala.concurrent.Promise`.
+ It will propagate the context when using chaining methods such as `map`, `flatMap`, `traverse`, ...
+
+
+
+ To enable Scala Future support, you need to enable experimental plugins.
+
+
+
+
+
+ 1.18.0
+
+
+
+
+
+
+ Reactor
+
+
+
+ 3.2.x+
+
+
+
+ The agent propagates the context for `Flux` and `Mono`.
+
+
+
+ 1.24.0 (experimental), 1.34.0 (GA)
+
+
+
+
+
+
+
+
+
+
+## Messaging frameworks
+When using a messaging framework, sender context is propagated so that receiver events are correlated to the
+same trace.
+
+| Framework | Supported versions | Description | Since |
+|---|---|---|---|
+| JMS | 1.1, 2.0 | The agent captures JMS sends and receives as spans/transactions | `javax.jms` since 1.13.0, `jakarta.jms` since 1.40.0 |
+| Kafka | \<0.11.0 - without distributed tracing; 0.11.0+ - full support | The agent captures Kafka record sends and polls. Kafka streams are not traced. | 1.13.0 |
+| RabbitMQ | 3.x - 5.x | The agent captures RabbitMQ Message sends, consumption and polling | 1.20.0 |
+| AWS SQS | 1.x, 2.x | The agent captures SQS Message sends and polling as well as SQS message sends and consumption through JMS. | 1.34.0 |
+
+### Distributed Tracing
+
+The Java agent instrumentation for messaging system clients includes both senders and receivers.
+When an instrumented client sends a message within a traced transaction, a `send` span is created. In addition, if the messaging system
+supports message/record headers/annotations, the agent would add the `tracecontext` headers to enable distributed tracing.
+
+On the receiver side, instrumented clients will attempt to create the proper distributed trace linkage in one of several ways, depending
+on how messages are received:
+
+* _Passive message handling:_ when the message handling logic is applied by implementing a passive message listener API (like
+ `javax.jms.MessageListener#onMessage` for example), creating the receiver transaction is mostly straightforward as the instrumented API
+ method invocation encapsulates message handling. Still, there are two use cases to consider:
+
+ * _Single message handling:_ when the message listener API accepts a single message, the agent would create a `messaging` typed
+ transaction per each received message, as a child transaction of the `send` span that corresponds the received message and with the same
+ trace ID
+
+ * _Batch message handling:_ when the message listener API accepts a batch of messages (like
+ `org.springframework.amqp.core.MessageListener.onMessageBatch` for example), the agent will create a single root transaction (i.e.
+ different trace ID from any of the `send` spans) by default to encapsulate the entire batch handling. The batch processing transaction
+ would be of `messaging` type, containing links__*__ to all `send` spans that correspond the messages in the batch. This can be changed
+ through the (non-documented) `message_batch_strategy` config option, which accepts either `BATCH_HANDLING` (default) or `SINGLE_HANDLING`
+ to enable the creation of a single child transaction per message.
+
+* _Active message polling:_ in some cases, message are consumed from the broker through active polling.
+ Whenever the polling action occurs while there is already an active span, the agent will create a `poll` span and add span links__*__ to
+ it for each message returned by the poll action that contains `tracecontext` headers.
+ Since such polling APIs don't provide any indication as to when message handling actually occurs, the agent needs to apply some
+ heuristics in order to trace message handling. There are two use cases to consider in this type of message receiving as well:
+
+ * _Polling returns a single message:_ in such cases, the agent may apply assumptions with regard to the threads that execute the message
+ handling logic in order to determine when handling starts and ends. Based on that, it would create a transaction per consumed message. If
+ the consumed message contains the `tracecontext` headers, the `receive` transaction will be a child of the corresponding `send` span.
+
+ * _Polling returns a message batch:_ typically, in such cases the agent will wrap the message collection and rely on the actual
+ iteration to create a transaction per message as the child of the corresponding `send` span and as part of the same trace. If iteration
+ occurs while there is already an active span, then the agent will add a link__*__ for each message `send` span to the active (parent)
+ span instead of creating transaction/span per message.
+
+_*_ Span links are supported by APM Server and Kibana since version 8.3 and by the Java agent since version 1.32.0
+
+### RabbitMQ Specifics
+
+- `context.message.queue.name` field will contain queue name when using polling, exchange name otherwise.
+- `context.message.destination.resource` field will contain `rabbitmq/XXX` where `XXX` is exchange name.
+
+Some exchange/queue names are normalized in order to keep low cardinality and user-friendlyness
+- default exchange is indicated with ``.
+- `null` exchange is normalized to ``, for example when polling without a message.
+- generated queues whose name start with `amq.gen-` are normalized to `amq.gen-*`.
+
+
+
+## Scheduling frameworks
+When using a scheduling framework a transaction for every execution will be created.
+
+
+
+
+ Scheduling Annotation
+
+
+
+
+
+
+
+ The agent instruments any method defined in a package configured in {/* `application_packages` */} and annotated with one of the following:
+ `org.springframework.scheduling.annotation.Scheduled`
+ `org.springframework.scheduling.annotation.Schedules`
+ `javax.ejb.Schedule`
+ `javax.ejb.Schedules`
+ `jakarta.ejb.Schedule`
+ `jakarta.ejb.Schedules` in order to create a transaction with the type `scheduled`, representing the scheduled task execution
+
+
+
+ 1.6.0, `jakarta.ejb.Schedule` since 1.28.0
+
+
+
+
+
+
+ Quartz
+
+
+
+ 1.0+
+
+
+
+ The agent instruments the `execute` method of any class implementing `org.quartz.Job`, as well as the `executeInternal` method of any class extending `org.springframework.scheduling.quartz.QuartzJobBean`, and creates a transaction with the type `scheduled`, representing the job execution
+
+
+ only classes from the quartz-jobs dependency will be instrumented automatically. For the instrumentation of other jobs the package must be added to the {/* `application_packages` */} parameter.
+
+
+
+
+
+
+ 1.8.0 - 2.0+
+
+ 1.26.0 - 1.0+
+
+
+
+
+
+
+ TimerTask
+
+
+
+
+
+
+
+ The agent instruments the `run` method in a package configured in {/* `application_packages` */} of any class extending `java.util.TimerTask`, and creates a transaction with the type `scheduled`, representing the job execution
+
+
+
+ 1.18.0
+
+
+
+
+
+
+
+
+## Logging frameworks
+
+There are multiple log-related features in the agent and their support depend on the logging framework:
+
+- **{/* Correlation */}**:
+ The agent automatically injects `trace.id`, `transaction.id` and `error.id` into the MDC implementation (see below for framework specific MDC implementations used. MDC = Mapped Diagnostic Context, a standard way to enrich log messages with additional information).
+ For service correlation, the agent sets values for `service.name`, `service.version` and `service.environment`, using ECS log format is required (`ecs-logging-java` or reformatting).
+
+- **{/* Error capturing */}**:
+ Automatically captures exceptions for calls like `logger.error("message", exception)`.
+
+- **{/* Reformatting */}**:
+ When {/* `log_ecs_reformatting` */} is enabled, logs will be automatically reformatted into
+ ECS-compatible format.
+
+
+
+ slf4j
+ 1.4.1+
+
+ Error capturing - 1.10.0
+
+
+ log4j2
+
+ Correlation - 2.0+
+
+ Reformatting - 2.6+
+
+
+
+ [`org.apache.logging.log4j.ThreadContext`](https://logging.apache.org/log4j/2.x/manual/thread-context.html) is used for correlation.
+
+
+
+ Correlation (traces) - 1.13.0
+
+ Correlation (service) - 1.29.0
+
+ Error capturing - 1.10.0
+
+ Reformatting - 1.22.0
+
+
+
+ log4j1
+
+ Correlation & error capture - 1.x
+
+ Reformatting - 1.2.17
+
+
+
+ [`org.apache.log4j.MDC`](https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/MDC.html) is used for correlation.
+
+
+
+ Correlation (traces) - 1.13.0
+
+ Correlation (service) - 1.38.0
+
+ Reformatting - 1.22.0
+
+
+
+ Logback
+ 1.1.0+
+
+ [`org.slf4j.MDC`](https://www.slf4j.org/api/org/slf4j/MDC.html) is used for correlation.
+
+
+
+ Correlation (traces) - 1.0.0
+
+ Correlation (service) - 1.38.0
+
+
+
+ JBoss Logging
+ 3.0.0+
+ http://javadox.com/org.jboss.logging/jboss-logging/3.3.0.Final/org/jboss/logging/MDC.html[`org.jboss.logging.MDC`] is used for correlation.
+
+ Correlation (traces) - 1.23.0 (LogManager 1.30.0)
+
+ Correlation (service) - 1.38.0
+
+
+
+ JUL - `java.util.logging`
+ All supported Java versions
+
+ Correlation is only supported with ECS logging (library or reformatting) as JUL does
+ not provide any MDC implementation.
+
+
+ Correlation (traces) - 1.35.0 (requires ECS logging)
+
+ Correlation (service) - 1.38.0 (requires ECS logging)
+
+ Reformatting - 1.31.0
+
+
+
+ Tomcat JULI
+ 7.0.0+
+
+ Trace correlation is only supported with ECS logging (library or reformatting) as JUL does
+ not provide any MDC implementation.
+
+ Tomcat access logs are not supported.
+
+
+ Correlation (traces) - 1.35.0 (requires ECS logging)
+
+ Correlation (service) - 1.38.0 (requires ECS logging)
+
+ Reformatting - 1.35.0
+
+
+
+
+
+
+## Process frameworks
+
+| Framework | Supported versions | Description | Since |
+|---|---|---|---|
+| `java.lang.Process` | | Instruments `java.lang.Process` execution. Java 9 API using `ProcessHandler` is not supported yet. | 1.13.0 |
+| Apache commons-exec | 1.3 | Async process support through `org.apache.commons.exec.DefaultExecutor` and subclasses instrumentation. | 1.13.0 |
+
+
+
+## RPC frameworks
+
+| Framework | Supported versions | Description | Since |
+|---|---|---|---|
+| gRPC | 1.6.1+ | Client (synchronous & asynchronous) & Server instrumentation. Streaming calls are currently not instrumented. | 1.16.0 |
+
+
+
+## AWS Lambda runtimes
+
+AWS Lambda provides multiple [JVM base images](https://docs.aws.amazon.com/lambda/latest/dg/java-image.html). Only those that support the `AWS_LAMBDA_EXEC_WRAPPER` environment variables are supported out of the box.
+
+Running with unsupported images is still possible but requires providing agent configuration through environment variables
+explicitly.
+
+{/* */}
+
+
+
+## Java method monitoring
+
+If you are seeing gaps in the span timeline and want to include additional methods, there are several options. See {/* How to find slow methods */} for more information.
+
+
+
+## Metrics
+
+| Framework | Description | Since |
+|---|---|---|
+| Built-in metrics | The agent sends various system, JVM, and application metrics. See the {/* metrics */} documentation. | 1.3.0 |
+| JMX | Set the configuration option {/* `capture_jmx_metrics` */} in order to monitor any JMX metric. | 1.11.0 |
+| Micrometer | Automatically detects and reports the metrics of each `MeterRegistry`. See {/* Micrometer metrics */} for more details. | 1.18.0 |
+
+
+
+## Caveats
+* Other JVM languages, like Scala, Kotlin and Groovy have not been tested yet.
+
diff --git a/docs/apm-agents-java.mdx b/docs/apm-agents-java.mdx
new file mode 100644
index 0000000000..eccaac3bd8
--- /dev/null
+++ b/docs/apm-agents-java.mdx
@@ -0,0 +1,55 @@
+---
+id: serverlessObservabilityApmAgentsJava
+slug: /serverless/observability/apm-agents-java
+title: Java
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+export let env_github = false
+
+
+
+
+For the best reading experience,
+please view this documentation at [elastic.co](https://www.elastic.co/guide/en/apm/agent/java)
+
+
+
+
+
+
+The Elastic APM Java Agent automatically measures the performance of your application and tracks errors.
+It has built-in support for popular frameworks and technologies,
+as well as a simple {/* API */} which allows you to instrument any application, and
+a {/* Plugin API */} that allows you to add custom instrumentation.
+
+
+The minimum required version of the APM Server is 6.5.0
+
+
+
+
+## How does the Agent work?
+
+The Agent auto-instruments Supported technologies and records interesting events,
+like spans for database queries and transactions for incoming HTTP requests.
+To do this, it leverages the capability of the JVM to instrument the bytecode of classes.
+This means that for the supported technologies, there are no code changes required.
+
+Spans are grouped in transactions -- by default, one for each incoming HTTP request.
+But it's possible to create custom transactions not associated with an HTTP request.
+Transactions and Spans are sent to the APM Server, where they're converted to a format suitable for Elasticsearch.
+You can then use the APM app in Kibana to gain insight into latency issues and error culprits within your application.
+
+More detailed information on how the Agent works can be found in the {/* FAQ */}.
+
+
+
+## Additional components
+
+APM Agents work in conjunction with the [APM Server](((apm-guide-ref))/index.html), [Elasticsearch](((ref))/index.html), and [Kibana](((kibana-ref))/index.html).
+The [APM Guide](((apm-guide-ref))/index.html) provides details on how these components work together,
+and provides a matrix outlining [Agent and Server compatibility](((apm-guide-ref))/agent-server-compatibility.html).
diff --git a/docs/apm-agents-net-api.mdx b/docs/apm-agents-net-api.mdx
new file mode 100644
index 0000000000..e6bf1701a5
--- /dev/null
+++ b/docs/apm-agents-net-api.mdx
@@ -0,0 +1,904 @@
+---
+id: serverlessObservabilityApmAgentsNetApi
+slug: /serverless/observability/apm-agents-net-api
+title: API
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+export let env_github = false
+
+
+
+
+For the best reading experience,
+please view this documentation at [elastic.co](https://www.elastic.co/guide/en/apm/agent/dotnet)
+
+
+
+
+
+
+The public API of the Elastic APM .NET agent lets you
+customize and manually create spans and transactions,
+as well as track errors.
+
+
+
+## Initialization
+
+The API does not require explicit Agent initialization—agent initialization is optional. The `Elastic.Apm.Agent.IsConfigured` property lets you check whether the agent is already initialized.
+
+
+
+### Implicit agent initialization
+
+If you don't explicitly initialize the agent, it will be started with a default component setup. This means the Agent will read configuration settings from environment variables. If you don't set an environment variable, the Agent will use the default value. For example, the `ServerUrl` default is `http://localhost:8200`.
+
+This implicit initialization of the agent happens on the first call on the `Elastic.Apm.Agent` class.
+
+
+One exception is the `Elastic.Apm.Agent.IsConfigured` method. This method never initializes the agent, it only checks if the agent is already initialized.
+
+
+Another example of initialization is when you enable the Agent with one of the technology-specific methods from the Set up the Agent instructions. Specifically when the `UseElasticApm` or `UseAllElasticApm` method is called in ASP.NET Core or when the IIS module is initialized in an IIS application.
+
+The default agent setup should cover most of the use cases and the primary way to configure the agent is through environment variables.
+
+
+
+### Explicit agent initialization
+
+If you would like to replace one of the agent components, you can do so by calling the `Elastic.Apm.Agent.Setup(AgentComponents)` method.
+In the AgentComponents you can pass following optional components to the agent:
+
+- `IApmLogger`: A logger implementation that will be used to print log messages. Default: A console logger.
+- `IPayloadSender`: A component that receives all the captured events like spans, transactions, and metrics. The default implementation serializes all events and sends them to the Elastic APM Server
+- `IConfigurationReader`: A component that reads agent configuration settings. The default implementation reads configuration through environment variables.
+
+
+In the case of ASP.NET Core, when you register the agent, the `UseElasticApm` and the `UseAllElasticApm` methods both implicitly initialize the agent by calling the `Elastic.Apm.Agent.Setup` method internally. In that setup, the `IConfigurationReader` implementation will read configuration from the ASP.NET Core configuration system in case you pass an `IConfiguration` instance to the method. The `IApmLogger` instance will also log through the configured logging provider by integrating into the ASP.NET Core logging system.
+
+
+
+
+## Auto instrumentation in combination with the Public Agent API
+
+With the `Elastic.Apm.Agent.Subscribe(params IDiagnosticsSubscriber[] subscribers)` method you can turn on auto instrumentation for supported libraries.
+
+In the case of ASP.NET Core, when you turn on the agent with the `UseAllElasticApm` method, the agent will do this automatically.
+
+With a typical console application, you need to do this manually by
+calling `Elastic.Apm.Agent.Subscribe(params IDiagnosticsSubscriber[] subscribers)` method somewhere in your application, ideally in
+the startup code.
+
+`IDiagnosticsSubscriber` implementations are offered by the agent and they subscribe to diagnostic source events or other data sources in order to capture events automatically.
+
+Some examples:
+
+* `HttpDiagnosticsSubscriber`: captures HTTP calls through `HttpClient` and `HttpWebRequest`
+
+ ```csharp
+ Agent.Subscribe(new HttpDiagnosticsSubscriber());
+ ```
+
+* `EfCoreDiagnosticsSubscriber`: captures database calls through Entity Framework Core
+* `SqlClientDiagnosticSubscriber`: captures database calls through `SqlClient`
+
+
+
+When the agent is configured with {/* `Enabled` set to `false` */}, `Elastic.ApmAgent.Subscribe(params IDiagnosticsSubscriber[] subscribers)` will not subscribe the subscribers to
+diagnostic source events.
+
+
+
+
+
+## Tracer API
+The tracer gives you access to the currently active transaction and it enables you to manually start a transaction.
+
+You can access the API by using the static property on the Agent: `Elastic.Apm.Agent.Tracer`.
+
+
+
+#### `ITransaction StartTransaction(string name, string type, DistributedTracingData = null)`
+Use this method to create a custom transaction.
+
+Note that in the case of auto-instrumentation, the agent will automatically do this for you. For example, if you have incoming HTTP calls in an ASP.NET Core application, the agent automatically starts a transaction. In these instances, this method is not needed.
+
+It's important to call `void End()` when the transaction has ended.
+A best practice is to use the transaction in a try-catch-finally block or to use the `CaptureTransaction` method.
+
+Example:
+
+```csharp
+var transaction = Elastic.Apm.Agent
+ .Tracer.StartTransaction("MyTransaction", ApiConstants.TypeRequest);
+try
+{
+ //application code that is captured as a transaction
+}
+catch (Exception e)
+{
+ transaction.CaptureException(e);
+ throw;
+}
+finally
+{
+ transaction.End();
+}
+```
+
+
+
+#### `ITransaction CurrentTransaction`
+Returns the currently active transaction.
+See the Transaction API to customize the current transaction.
+
+If there is no current transaction,
+this method will return `null`.
+
+```csharp
+var transaction = Elastic.Apm.Agent.Tracer.CurrentTransaction;
+```
+
+
+
+#### `ISpan CurrentSpan`
+Returns the currently active span.
+See the Span API to customize the current span.
+
+If there is no current span,
+this method will return `null`.
+
+```csharp
+var span = Elastic.Apm.Agent.Tracer.CurrentSpan;
+```
+
+
+
+#### `CaptureTransaction`
+
+This is a convenient method which starts and ends a transaction and captures unhandled exceptions.
+It has 3 required parameters:
+
+* `name`: The name of the transaction
+* `type` The type of the transaction
+* One of the following types which references the code that you want to capture as a transaction:
+ * `Action`
+ * `Action`
+ * `Func`
+ * `Func`
+ * `Func`
+ * `Func`
+ * `Func>`
+ * `Func>`
+
+And an optional parameter:
+
+* `distributedTracingData`: A `DistributedTracingData` instance that contains the distributed tracing information in case you want the new transaction to be a part of a trace.
+
+The following code is the equivalent of the previous example with the convenient API. It automatically starts and ends the transaction and reports unhandled exceptions. The `t` parameter gives you access to the `ITransaction` instance which represents the transaction that you just created.
+
+```csharp
+Elastic.Apm.Agent.Tracer
+ .CaptureTransaction("TestTransaction", ApiConstants.TypeRequest, (t) =>
+{
+ //application code that is captured as a transaction
+});
+```
+
+This API also supports `async` methods with the `Func` overloads.
+
+
+The duration of the transaction will be the timespan between the first and the last line of the `async` lambda expression.
+
+
+Example:
+
+```csharp
+await Elastic.Apm.Agent.Tracer
+ .CaptureTransaction("TestTransaction", "TestType", async () =>
+{
+ //application code that is captured as a transaction
+ await Task.Delay(500); //sample async code
+});
+```
+
+
+Return value of `CaptureTransaction` method overloads that accept Task (or `Task`) is the same Task (or `Task`) instance as the one passed as the argument so if your application should continue only after the task completes you have to call `CaptureTransaction` with `await` keyword.
+
+
+{/* ---------------------------- */}
+
+
+
+#### Manually propagating distributed tracing context
+{/* ---------------------------- */}
+Agent automatically propagates distributed tracing context for the supported technologies (see Networking client-side technologies).
+If your application communicates over a protocol that is not supported by the agent
+you can manually propagate distributed tracing context from the caller to the callee side using Public Agent API.
+
+First you serialize distributed tracing context on the caller side:
+
+```csharp
+string outgoingDistributedTracingData =
+ (Agent.Tracer.CurrentSpan?.OutgoingDistributedTracingData
+ ?? Agent.Tracer.CurrentTransaction?.OutgoingDistributedTracingData)?.SerializeToString();
+```
+Then you transfer the resulted string to the callee side
+and you continue the trace by passing deserialized distributed tracing context to any of
+`ITransaction StartTransaction(string name, string type, DistributedTracingData = null)` or `CaptureTransaction` APIs - all
+of these APIs have an optional `DistributedTracingData` parameter.
+For example:
+
+```csharp
+var transaction2 = Agent.Tracer.StartTransaction("Transaction2", "TestTransaction",
+ DistributedTracingData.TryDeserializeFromString(serializedDistributedTracingData));
+```
+
+
+The `OutgoingDistributedTracingData` property can be `null`. One such scenario is when the agent is disabled.
+
+
+
+
+#### `void CaptureError(string message, string culprit, StackFrame[] frames = null, string parentId = null);`
+Use this method to capture an APM error with a message and a culprit.
+
+
+Captured errors are automatically correlated with the active transaction. If no transaction is active, the error will still appear in the APM app but will not be correlated with a transaction.
+
+
+Example:
+
+```csharp
+Agent.Tracer.CaptureError("Something went wrong", "Database issue");
+```
+
+
+
+#### `void CaptureException(Exception exception, string culprit = null, bool isHandled = false, string parentId = null);`
+
+Use this method to capture a .NET exception as an APM error.
+
+
+Captured errors are automatically correlated with the active transaction. If no transaction is active, the error will still appear in the APM app but will not be correlated with a transaction.
+
+
+Example:
+
+```csharp
+try
+{
+ //run my code
+}
+catch (Exception e)
+{
+ Agent.Tracer.CaptureException(e);
+ //handle error
+}
+```
+
+
+
+#### `void CaptureErrorLog(ErrorLog errorLog, string parentId = null, Exception exception = null);`
+
+Use this method to capture a log event as an APM error.
+
+
+Captured errors are automatically correlated with the active transaction. If no transaction is active, the error will still appear in the APM app but will not be correlated with a transaction.
+
+
+Example:
+
+```csharp
+var errorLog = new ErrorLog("Error message")
+{
+ Level = "error",
+ ParamMessage = "42"
+};
+
+Agent.Tracer.CaptureErrorLog(errorLog);
+```
+
+{/* ---------------------------- */}
+
+
+
+## Transaction API
+{/* ---------------------------- */}
+A transaction describes an event captured by an Elastic APM agent monitoring a service. Transactions help combine multiple Spans into logical groups, and they are the first {/* Span */} of a service. More information on Transactions and Spans is available in the [APM data model](((apm-guide-ref))/data-model.html) documentation.
+
+See `ITransaction CurrentTransaction` on how to get a reference of the current transaction.
+
+
+Calling any of the transaction's methods after `void End()` has been called is illegal.
+You may only interact with a transaction when you have control over its lifecycle.
+
+
+
+
+#### `ISpan StartSpan(string name, string type, string subType = null, string action = null)`
+Start and return a new custom span as a child of the given transaction.
+
+It is important to call `void End()` when the span has ended or to use the `CaptureSpan` method.
+A best practice is to use the span in a try-catch-finally block.
+
+Example:
+
+```csharp
+ISpan span = transaction.StartSpan("Select FROM customer",
+ ApiConstants.TypeDb, ApiConstants.SubtypeMssql, ApiConstants.ActionQuery);
+try
+{
+ //execute db query
+}
+catch(Exception e)
+{
+ span.CaptureException(e);
+ throw;
+}
+finally
+{
+ span.End();
+}
+```
+
+
+
+#### `void SetLabel(string key, T value)` 1.7.0
+
+Labels are used to add **indexed** information to transactions, spans, and errors.
+Indexed means the data is searchable and aggregatable in Elasticsearch.
+Multiple labels can be defined with different key-value pairs.
+
+* Indexed: Yes
+* Elasticsearch type: [object](((ref))/object.html)
+* Elasticsearch field: `labels` (previously `context.tags` in \
+Number and boolean labels were only introduced in APM Server 6.7+.
+Using this API in combination with an older APM Server versions leads to validation errors.
+
+
+
+Avoid defining too many user-specified labels.
+Defining too many unique fields in an index is a condition that can lead to a
+[mapping explosion](((ref))/mapping.html#mapping-limit-settings).
+
+
+```csharp
+transaction.SetLabel("stringSample", "bar");
+transaction.SetLabel("boolSample", true);
+transaction.SetLabel("intSample", 42);
+```
+
+* `String key`: The tag key
+* `String|Number|bool value`: The tag value
+
+
+
+#### `T TryGetLabel(string key, out T value)` 1.7.1
+
+Returns the transaction's label in the `value` out parameter. If the `key` does not exist, this method returns false.
+Labels can be added with the SetLabel method.
+
+```csharp
+if(transaction.TryGetLabel("foo", our var myLabel))
+ Console.WriteLine(myLabel);
+```
+
+
+
+#### `Dictionary Labels`
+
+
+This property is obsolete and will be be removed in a future version. Use the `void SetLabel()` method instead, which allows setting labels of string, boolean and number. This property remains for now in order to not break binary compatibility, and at serialization time, the values set with `.SetLabel()` are combined with `Labels` to form the set of labels sent to APM server, with values in `Labels` taking precedence.
+
+
+A flat mapping of user-defined labels with string values.
+
+If the key contains any special characters (`.`,`*`, `"`), they will be replaced with underscores. For example `a.b` will be stored as `a_b`.
+
+
+Before using custom labels, ensure you understand the different types of
+[metadata](((apm-guide-ref))/data-model-metadata.html) that are available.
+
+
+
+Avoid defining too many user-specified labels.
+Defining too many unique fields in an index is a condition that can lead to a
+[mapping explosion](((ref))/mapping.html#mapping-limit-settings).
+
+
+```csharp
+Agent.Tracer
+ .CaptureTransaction(TransactionName, TransactionType,
+ transaction =>
+ {
+ transaction.Labels["foo"] = "bar";
+ //application code that is captured as a transaction
+ });
+```
+
+* `key`: The label key
+* `value`: The label value
+
+
+
+#### `void End()`
+Ends the transaction and schedules it to be reported to the APM Server.
+
+It is illegal to call any methods on a span instance which has already ended.
+This also includes this method and `ISpan StartSpan(string name, string type, string subType = null, string action = null)`.
+
+Example:
+
+```csharp
+transaction.End();
+```
+
+
+If you use the `CaptureTransaction` method you must not call {/* `void End()` */}.
+
+
+
+
+#### `void CaptureException(Exception e)`
+Captures an exception and reports it to the APM server.
+
+
+
+#### `void CaptureError(string message, string culprit, StackFrame[] frames)`
+Captures a custom error and reports it to the APM server.
+
+This method is typically used when you want to report an error, but you don't have an `Exception` instance.
+
+
+
+#### `void CaptureErrorLog(ErrorLog errorLog, string parentId = null, Exception exception = null);`
+Captures a custom error and reports it to the APM server with a log attached to it.
+
+This method is typically used when you already log errors in your code and you want to attach this error to an APM transaction. The log will show up on the APM UI as part of the error and it will be correlated to the transaction.
+
+
+
+#### `CaptureSpan`
+
+This is a convenient method which starts and ends a span on the given transaction and captures unhandled exceptions. It has the same overloads as the `CaptureTransaction` method.
+
+It has 3 required parameters:
+
+* `name`: The name of the span
+* `type` The type of the span
+* One of the following types which references the code that you want to capture as a transaction:
+ * `Action`
+ * `Action`
+ * `Func`
+ * `Func`
+ * `Func`
+ * `Func`
+ * `Func>`
+ * `Func>`
+
+and 2 optional parameters:
+
+* `supType`: The subtype of the span
+* `action`: The action of the span
+
+The following code is the equivalent of the previous example from the `ISpan StartSpan(string name, string type, string subType = null, string action = null)` section with the convenient API. It automatically starts and ends the span and reports unhandled exceptions. The `s` parameter gives you access to the `ISpan` instance which represents the span that you just created.
+
+```csharp
+ITransaction transaction = Elastic.Apm.Agent.Tracer.CurrentTransaction;
+
+transaction.CaptureSpan("SampleSpan", ApiConstants.TypeDb, (s) =>
+{
+ //execute db query
+}, ApiConstants.SubtypeMssql, ApiConstants.ActionQuery);
+```
+
+Similar to the {/* `CaptureTransaction` */} API, this method also supports `async` methods with the `Func` overloads.
+
+
+The duration of the span will be the timespan between the first and the last line of the `async` lambda expression.
+
+
+This example shows you how to track an `async` code block that returns a result (`Task`) as a span:
+
+```csharp
+ITransaction transaction = Elastic.Apm.Agent.Tracer.CurrentTransaction;
+var asyncResult = await transaction.CaptureSpan("Select FROM customer", ApiConstants.TypeDb, async(s) =>
+{
+ //application code that is captured as a span
+ await Task.Delay(500); //sample async code
+ return 42;
+});
+```
+
+
+Return value of `CaptureSpan` method overloads that accept Task (or `Task`) is the same Task (or `Task`) instance as the one passed as the argument so if your application should continue only after the task completes you have to call {/* `CaptureSpan` */} with `await` keyword.
+
+
+
+Code samples above use `Elastic.Apm.Agent.Tracer.CurrentTransaction`. In production code you should make sure the `CurrentTransaction` is not `null`.
+
+
+
+
+#### `EnsureParentId`
+
+If the transaction does not have a ParentId yet, calling this method generates a new ID, sets it as the ParentId of this transaction, and returns it as a `string`.
+
+This enables the correlation of the spans the JavaScript Real User Monitoring (RUM) agent creates for the initial page load with the transaction of the backend service.
+
+If your service generates the HTML page dynamically, initializing the JavaScript RUM agent with the value of this method allows analyzing the time spent in the browser vs in the backend services.
+
+To enable the JavaScript RUM agent in ASP.NET Core, initialize the RUM agent with the .NET agent’s current transaction:
+
+```JavaScript
+
+```
+
+See the [JavaScript RUM agent documentation](((apm-rum-ref))) for more information.
+
+
+
+#### `Dictionary Custom`
+
+Custom context is used to add non-indexed, custom contextual information to transactions.
+Non-indexed means the data is not searchable or aggregatable in Elasticsearch, and you cannot build dashboards on top of the data.
+However, non-indexed information is useful for other reasons, like providing contextual information to help you quickly debug performance issues or errors.
+
+If the key contains any special characters (`.`,`*`, `"`), they will be replaced with underscores. For example `a.b` will be stored as `a_b`.
+
+Unlike `Dictionary Labels`, the data in this property is not trimmed.
+
+```csharp
+Agent.Tracer.CaptureTransaction(transactionName, transactionType, (transaction) =>
+{
+ transaction.Custom["foo"] = "bar";
+ transaction.End();
+});
+```
+
+
+
+#### `void SetService(string serviceName, string serviceVersion)` (1.7)
+
+Overwrite the service name and version on a per transaction basis. This is useful when you host multiple services in a single process.
+
+When not set, transactions are associated with the default service.
+
+This method has two `string` parameters:
+
+* `serviceName`: The name of the service to associate with the transaction.
+* `serviceVersion`: The version of the service to associate with the transaction.
+
+Usage:
+
+```csharp
+var transaction = agent.Tracer.StartTransaction("Transaction1", "sample");
+transaction.SetService("MyServiceName", "1.0-beta1");
+```
+
+It can also be used with the Filter API (added[1.5]):
+
+```csharp
+Agent.AddFilter( transaction =>
+{
+ transaction.SetService("MyServiceName", "1.0-beta1");
+ return transaction;
+});
+```
+
+
+
+#### `Context`
+You can attach additional context to manually captured transactions.
+
+If you use a web framework for which agent doesn't capture transactions automatically (see Web frameworks),
+you can add context related to the captured transaction by setting various properties of transaction's `Context` property.
+For example:
+
+```csharp
+Agent.Tracer.CaptureTransaction("MyCustomTransaction",ApiConstants.TypeRequest, (transaction) =>
+{
+ transaction.Context.Request = new Request(myRequestMethod, myRequestUri);
+
+ // ... code executing the request
+
+ transaction.Context.Response =
+ new Response { StatusCode = myStatusCode, Finished = wasFinished };
+});
+```
+
+{/* ---------------------------- */}
+
+
+
+## Span API
+{/* ---------------------------- */}
+A span contains information about a specific code path, executed as part of a transaction.
+
+If for example a database query happens within a recorded transaction,
+a span representing this database query may be created.
+In such a case, the name of the span will contain information about the query itself,
+and the type will hold information about the database type.
+
+
+
+#### `ISpan StartSpan(string name, string type, string subType = null, string action = null)`
+Start and return a new custom span as a child of the given span. Very similar to the `ISpan StartSpan(string name, string type, string subType = null, string action = null)` method on `ITransaction`, but in this case the parent of the newly created span is a span itself.
+
+It is important to call `void End()` when the span has ended or to use the {/* `CaptureSpan` */} method.
+A best practice is to use the span in a try-catch-finally block.
+
+Example:
+
+```csharp
+ISpan childSpan = parentSpan.StartSpan("Select FROM customer",
+ ApiConstants.TypeDb, ApiConstants.SubtypeMssql, ApiConstants.ActionQuery);
+try
+{
+ //execute db query
+}
+catch(Exception e)
+{
+ childSpan?.CaptureException(e);
+ throw;
+}
+finally
+{
+ childSpan?.End();
+}
+```
+
+
+
+#### `void SetLabel(string key, T value)` 1.7.0
+
+A flat mapping of user-defined labels with string, number or boolean values.
+
+
+In version 6.x, labels are stored under `context.tags` in Elasticsearch.
+As of version 7.x, they are stored as `labels` to comply with the [Elastic Common Schema (ECS)](https://github.com/elastic/ecs).
+
+
+
+The labels are indexed in Elasticsearch so that they are searchable and aggregatable.
+By all means,
+you should avoid that user specified data,
+like URL parameters,
+is used as a tag key as it can lead to mapping explosions.
+
+
+```csharp
+span.SetLabel("stringSample", "bar");
+span.SetLabel("boolSample", true);
+span.SetLabel("intSample", 42);
+```
+
+* `String key`: The tag key
+* `String|Number|bool value`: The tag value
+
+
+
+#### `T TryGetLabel(string key, out T value)` 1.7.1
+
+Returns the span's label in the `value` out parameter. If the `key` does not exist, this method returns false.
+Labels can be added with the SetLabel method.
+
+```csharp
+if(span.TryGetLabel("foo", out var myLabel))
+ Console.WriteLine(myLabel);
+```
+
+
+
+#### `Dictionary Labels`
+
+
+This property is obsolete and will be be removed in a future version. Use the `void SetLabel()` method instead, which allows setting labels of string, boolean and number. This property remains for now in order to not break binary compatibility, and at serialization time, the values set with `.SetLabel()` are combined with `Labels` to form the set of labels sent to APM server, with values in `Labels` taking precedence.
+
+
+Similar to `Dictionary Labels` on the {/* Transaction API */}: A flat mapping of user-defined labels with string values.
+
+If the key contains any special characters (`.`,`*`, `"`), they will be replaced with underscores. For example `a.b` will be stored as `a_b`.
+
+
+Before using custom labels, ensure you understand the different types of
+[metadata](((apm-guide-ref))/data-model-metadata.html) that are available.
+
+
+
+Avoid defining too many user-specified labels.
+Defining too many unique fields in an index is a condition that can lead to a
+[mapping explosion](((ref))/mapping.html#mapping-limit-settings).
+
+
+```csharp
+transaction.CaptureSpan(SpanName, SpanType,
+span =>
+ {
+ span.Labels["foo"] = "bar";
+ //application code that is captured as a span
+ });
+```
+
+
+
+#### `void CaptureException(Exception e)`
+Captures an exception and reports it to the APM server.
+
+
+
+#### `void CaptureError(string message, string culprit, StackFrame[] frames)`
+Captures a custom error and reports it to the APM server.
+
+This method is typically used when you want to report an error, but you don't have an `Exception` instance.
+
+
+
+#### `void CaptureErrorLog(ErrorLog errorLog, string parentId = null, Exception exception = null);`
+Captures a custom error and reports it to the APM server with a log attached to it.
+
+This method is typically used when you already log errors in your code and you want to attach this error to an APM transaction. The log will show up on the APM UI as part of the error and it will be correlated to the transaction of the given span.
+
+
+
+#### `void End()`
+Ends the span and schedules it to be reported to the APM Server.
+
+It is illegal to call any methods on a span instance which has already ended.
+
+
+
+#### `Context`
+You can attach additional context to manually captured spans.
+
+If you use a database library for which agent doesn't capture spans automatically (see Data access technologies),
+you can add context related to the captured database operation by setting span's `Context.Db` property.
+For example:
+
+```csharp
+Agent.Tracer.CurrentTransaction.CaptureSpan("MyDbWrite", ApiConstants.TypeDb, (span) =>
+{
+ span.Context.Db = new Database
+ { Statement = myDbStatement, Type = myDbType, Instance = myDbInstance };
+
+ // ... code executing the database operation
+});
+```
+
+If you use an HTTP library for which agent doesn't capture spans automatically (see Networking client-side technologies),
+you can add context related to the captured HTTP operation by setting span's `Context.Http` property.
+For example:
+
+```csharp
+Agent.Tracer.CurrentTransaction.CaptureSpan("MyHttpOperation", ApiConstants.TypeExternal, (span) =>
+{
+ span.Context.Http = new Http
+ { Url = myUrl, Method = myMethod };
+
+ // ... code executing the HTTP operation
+
+ span.Context.Http.StatusCode = myStatusCode;
+});
+```
+
+
+
+#### `CaptureSpan`
+
+This is a convenient method which starts and ends a child span on the given span and captures unhandled exceptions.
+
+Very similar to the {/* `CaptureSpan` */} method on `ITransaction`, but in this case the parent of the newly created span is a span itself.
+
+It has 3 required parameters:
+
+* `name`: The name of the span
+* `type` The type of the span
+* One of the following types which references the code that you want to capture as a transaction:
+ * `Action`
+ * `Action`
+ * `Func`
+ * `Func`
+ * `Func`
+ * `Func`
+ * `Func>`
+ * `Func>`
+
+and 2 optional parameters:
+
+* `supType`: The subtype of the span
+* `action`: The action of the span
+
+The following code is the equivalent of the previous example from the `ISpan StartSpan(string name, string type, string subType = null, string action = null)` section with the convenient API. It automatically starts and ends the span and reports unhandled exceptions. The `s` parameter gives you access to the `ISpan` instance which represents the span that you just created.
+
+```csharp
+span.CaptureSpan("SampleSpan", ApiConstants.TypeDb, (s) =>
+{
+ //execute db query
+}, ApiConstants.SubtypeMssql, ApiConstants.ActionQuery);
+```
+
+Similar to the {/* `CaptureTransaction` */} API, this method also supports `async` methods with the `Func` overloads.
+
+
+The duration of the span will be the timespan between the first and the last line of the `async` lambda expression.
+
+
+This example shows you how to track an `async` code block that returns a result (`Task`) as a span:
+
+```csharp
+var asyncResult = await span.CaptureSpan("Select FROM customer", ApiConstants.TypeDb, async(s) =>
+{
+ //application code that is captured as a span
+ await Task.Delay(500); //sample async code
+ return 42;
+});
+```
+
+
+Return value of `CaptureSpan` method overloads that accept Task (or `Task`) is the same Task (or `Task`) instance as the one passed as the argument so if your application should continue only after the task completes you have to call {/* `CaptureSpan` */} with `await` keyword.
+
+
+
+Code samples above use `Elastic.Apm.Agent.Tracer.CurrentTransaction`. In production code you should make sure the `CurrentTransaction` is not `null`.
+
+
+
+
+## Filter API (1.5)
+
+Use `Agent.AddFilter(filter)` to supply a filter callback.
+
+Each filter callback will be called just before data is sent to the APM Server. This allows you to manipulate the data being sent, like to remove sensitive information such as passwords.
+
+Each filter callback is called in the order they are added and will receive a payload object containing the data about to be sent to the APM Server as the only argument.
+
+The filter callback is synchronous and should return the manipulated payload object. If a filter callback doesn’t return any value or returns a falsy value, the remaining filter callback will not be called and the payload will not be sent to the APM Server.
+
+There are 3 overloads of the `Agent.AddFilter` method with the following arguments:
+
+- `Func`: A filter called for every transaction.
+- `Func`: A filter called for every span.
+- `Func`: A filter called for every error.
+
+Below are some usage examples of the Agent.AddFilter method.
+
+Drop all spans for a specific database:
+
+```csharp
+Agent.AddFilter((ISpan span) =>
+{
+ if (span.Context?.Db?.Instance == "VerySecretDb")
+ return null;
+ return span;
+});
+```
+
+Hide some data:
+
+```csharp
+Agent.AddFilter((ITransaction transaction) =>
+{
+ transaction.Context.Request.Url.Protocol = "[HIDDEN]";
+ return transaction;
+});
+```
diff --git a/docs/apm-agents-net-configure.mdx b/docs/apm-agents-net-configure.mdx
new file mode 100644
index 0000000000..b48480d860
--- /dev/null
+++ b/docs/apm-agents-net-configure.mdx
@@ -0,0 +1,55 @@
+---
+id: serverlessObservabilityApmAgentsNetConfigure
+slug: /serverless/observability/apm-agents-net-configure
+title: Configure
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+
+| Option name | Dynamic | Keywords |
+|---|---|---|
+| {/* `ApiKey` */} | No | Reporter |
+| {/* `ApplicationNamespaces` */} | No | Stacktrace |
+| {/* `CaptureBody` */} | Yes | HTTP, Performance |
+| {/* `CaptureBodyContentTypes` */} | Yes | HTTP, Performance |
+| {/* `CaptureHeaders` */} | Yes | HTTP, Performance |
+| {/* `CentralConfig` */} | No | Core |
+| {/* `CloudProvider` */} | No | Reporter |
+| {/* `DisableMetrics` */} | No | Reporter |
+| {/* `Enabled` */} | No | Core |
+| {/* `OpentelemetryBridgeEnabled` */} | No | Core |
+| {/* `Environment` */} | No | Core |
+| {/* `ExcludedNamespaces` */} | No | Stacktrace |
+| {/* `ExitSpanMinDuration` */} | Yes | Core, Performance |
+| {/* `FlushInterval` */} | No | Reporter |
+| {/* `GlobalLabels` */} | No | Core |
+| {/* `IgnoreMessageQueues` */} | Yes | Messaging, Performance |
+| {/* `HostName` */} | No | Core |
+| {/* `LogLevel` */} | Yes | Supportability |
+| {/* `MaxBatchEventCount` */} | No | Reporter |
+| {/* `MaxQueueEventCount` */} | No | Reporter |
+| {/* `MetricsInterval` */} | No | Reporter |
+| {/* `Recording` */} | Yes | Core |
+| {/* `SanitizeFieldNames` */} | Yes | Core |
+| {/* `SecretToken` */} | No | Reporter |
+| {/* `ServerCert` */} | No | Reporter |
+| {/* `ServerUrl` */} | No | Reporter |
+| {/* `ServiceName` */} | No | Core |
+| {/* `ServiceNodeName` */} | No | Core |
+| {/* `ServiceVersion` */} | No | Core |
+| {/* `SpanCompressionEnabled` */} | Yes | Core, Performance |
+| {/* `SpanCompressionExactMatchMaxDuration` */} | Yes | Core, Performance |
+| {/* `SpanCompressionSameKindMaxDuration` */} | Yes | Core, Performance |
+| {/* `SpanStackTraceMinDuration` */} | Yes | Stacktrace, Performance |
+| {/* `StackTraceLimit` */} | Yes | Stacktrace, Performance |
+| {/* `TraceContextIgnoreSampledFalse` */} | No | Core |
+| {/* `TransactionIgnoreUrls` */} | Yes | HTTP, Performance |
+| {/* `TransactionMaxSpans` */} | Yes | Core, Performance |
+| {/* `TransactionSampleRate` */} | Yes | Core, Performance |
+| {/* `TraceContinuationStrategy` */} | Yes | HTTP, Performance |
+| {/* `UseElasticTraceparentHeader` */} | No | HTTP |
+| {/* `UseWindowsCredentials` */} | No | Reporter |
+| {/* `VerifyServerCert` */} | No | Reporter |
diff --git a/docs/apm-agents-net-get-started.mdx b/docs/apm-agents-net-get-started.mdx
new file mode 100644
index 0000000000..8c41a2f358
--- /dev/null
+++ b/docs/apm-agents-net-get-started.mdx
@@ -0,0 +1,97 @@
+---
+id: serverlessObservabilityApmAgentsNetGetStarted
+slug: /serverless/observability/apm-agents-net-get-started
+title: Get started
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+export let nuget = "https://www.nuget.org/packages"
+
+export let dot = "."
+
+
+
+## Quick start
+
+To enable auto instrumentation for ASP.NET (Full .NET Framework), you need to install the `Elastic.Apm.AspNetFullFramework` package, add a reference
+to the package in your `web.config` file, and then compile and deploy your application.
+
+1. Ensure you have access to the application source code and install the [`Elastic.Apm.AspNetFullFramework`]({nuget}/Elastic.Apm.AspNetFullFramework)
+ package.
+
+1. Reference the `Elastic.Apm.AspNetFullFramework` in your application's `web.config` file by adding the `ElasticApmModule` IIS module:
+
+ ```xml
+
+
+
+
+
+
+
+
+ ```
+
+
+
+ There are two available configuration sources. To learn more, see {/* Configuration on ASP.NET */}.
+
+
+
+ By default, the agent creates transactions for all HTTP requests, including static content:
+ .html pages, images, etc.
+
+ To create transactions only for HTTP requests with dynamic content,
+ such as `.aspx` pages, add the `managedHandler` preCondition to your `web.config` file:
+
+ ```xml
+
+
+
+
+
+
+
+
+ ```
+
+
+
+ To learn more about adding modules, see the [Microsoft docs](https://docs.microsoft.com/en-us/iis/configuration/system.webserver/modules/add).
+
+
+
+1. Recompile your application and deploy it.
+
+ The `ElasticApmModule` instantiates the APM agent on the first initialization. However, there may be some scenarios where
+ you want to control the agent instantiation, such as configuring filters in the application start.
+
+ To do so, the `ElasticApmModule` exposes a `CreateAgentComponents()` method that returns agent components configured to work with
+ ASP.NET Full Framework, which can then instantiate the agent.
+
+ For example, you can add transaction filters to the agent in the application start:
+
+ ```c#
+ public class MvcApplication : HttpApplication
+ {
+ protected void Application_Start()
+ {
+ // other application startup e.g. RouteConfig, etc.
+
+ // set up agent with components
+ var agentComponents = ElasticApmModule.CreateAgentComponents();
+ Agent.Setup(agentComponents);
+
+ // add transaction filter
+ Agent.AddFilter((ITransaction t) =>
+ {
+ t.SetLabel("foo", "bar");
+ return t;
+ });
+ }
+
+ ```
+
+Now, the `ElasticApmModule` will use the instantiated instance of the APM agent upon initialization.
\ No newline at end of file
diff --git a/docs/apm-agents-net-install.mdx b/docs/apm-agents-net-install.mdx
new file mode 100644
index 0000000000..0e920c6fd1
--- /dev/null
+++ b/docs/apm-agents-net-install.mdx
@@ -0,0 +1,9 @@
+---
+id: serverlessObservabilityApmAgentsNetInstall
+slug: /serverless/observability/apm-agents-net-install
+title: Install
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+No source content found.
diff --git a/docs/apm-agents-net-performance-tuning.mdx b/docs/apm-agents-net-performance-tuning.mdx
new file mode 100644
index 0000000000..45deb29d40
--- /dev/null
+++ b/docs/apm-agents-net-performance-tuning.mdx
@@ -0,0 +1,96 @@
+---
+id: serverlessObservabilityApmAgentsNetPerformanceTuning
+slug: /serverless/observability/apm-agents-net-performance-tuning
+title: Performance tuning
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+export let env_github = false
+
+
+
+
+For the best reading experience,
+please view this documentation at [elastic.co](https://www.elastic.co/guide/en/apm/agent/dotnet/current/performance-tuning.html)
+
+
+
+
+
+
+There are many options available to tune agent performance.
+Which option to adjust depends on whether you are optimizing for speed, memory usage, bandwidth or storage.
+
+
+
+## Sampling
+
+The first knob to reach for when tuning the performance of the agent is {/* `TransactionSampleRate` */}.
+Adjusting the sample rate controls what percent of requests are traced.
+By default, the sample rate is set at `1.0`, meaning _all_ requests are traced.
+
+The sample rate will impact all four performance categories,
+so simply turning down the sample rate is an easy way to improve performance.
+
+Here's an example of setting the sample rate to 20% using {/* Configuration on ASP.NET Core */}:
+
+```js
+{
+ "ElasticApm": {
+ "TransactionSampleRate": 0.2
+ }
+}
+```
+
+
+
+## Stack traces
+
+In a complex application,
+a request may produce many spans.
+Capturing a stack trace for every span can result in significant memory usage.
+Stack traces are also captured for every error.
+There are several settings to adjust how stack traces are captured.
+
+
+
+### Disable capturing stack traces
+
+To disable capturing stack traces (for both spans and errors),
+set {/* `StackTraceLimit` */} to `0`.
+
+
+
+### Capture stack traces only for long running spans
+
+In its default settings,
+the APM agent collects a stack trace for every recorded span with duration longer than 5ms.
+To increase the duration threshold,
+set {/* `SpanStackTraceMinDuration` */}.
+
+
+
+### Reduce number of captured stack trace frames
+
+The {/* `StackTraceLimit` */} controls how many stack frames should be collected
+when a capturing stack trace.
+
+
+
+## Disable capturing HTTP request and response headers
+
+Capturing HTTP request and response headers increases memory allocations,
+network bandwidth and disk space used by Elasticsearch.
+To disable capturing HTTP request and response headers,
+set {/* `CaptureHeaders` */} to `false`.
+
+
+
+## Increase metrics collection interval
+
+The .NET agent tracks certain system and application metrics.
+These metrics are regularly collected and sent to the APM Server and from there to Elasticsearch.
+You can adjust the interval for metrics collection with the setting {/* `MetricsInterval` */}.
diff --git a/docs/apm-agents-net-supported-technologies.mdx b/docs/apm-agents-net-supported-technologies.mdx
new file mode 100644
index 0000000000..84d5773962
--- /dev/null
+++ b/docs/apm-agents-net-supported-technologies.mdx
@@ -0,0 +1,497 @@
+---
+id: serverlessObservabilityApmAgentsNetSupportedTechnologies
+slug: /serverless/observability/apm-agents-net-supported-technologies
+title: Supported technologies
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+export let env_github = false
+
+
+
+
+For the best reading experience,
+please view this documentation at [elastic.co](https://www.elastic.co/guide/en/apm/agent/dotnet)
+
+
+
+
+
+
+If your favorite technology is not supported yet,
+you can vote for it by participating in our
+[survey](https://docs.google.com/forms/d/18SgsVo9asGNFMjRqwdrk3wTHNwPhtHv4jE35hZRCL6A/).
+We will use the results to add support for the most requested technologies.
+
+Another option is to add a dependency to the agent's public API
+in order to programmatically create custom transactions and spans.
+
+If you want to extend the auto-instrumentation capabilities of the agent,
+the [contributing guide](https://github.com/elastic/apm-agent-dotnet/blob/main/CONTRIBUTING.md) should get you started.
+
+
+If, for example,
+the HTTP client library of your choice is not listed,
+it means that there won't be spans for those outgoing HTTP requests.
+If the web framework you are using is not supported,
+the agent will not capture transactions.
+
+
+
+
+## .NET versions
+
+The agent works on every .NET flavor and version that supports .NET Standard 2.0.
+This means .NET Core 2.0 or newer, and .NET Framework 4.6.1 or newer.
+
+
+
+## Web frameworks
+
+Automatic instrumentation for a web framework means
+a transaction is automatically created for each incoming request and it is named after the registered route.
+
+Automatic instrumentation is supported for the following web frameworks
+
+| Framework | Supported versions | Integration |
+|---|---|---|
+| ASP.NET Core 1.0 | 2.1+ | {/* NuGet package */} |
+| ASP.NET (.NET Framework) in IIS 1.1 | 4.6.1+ (IIS 7.0 or newer) | {/* Profiler auto instrumentation */} or {/* NuGet package */} |
+
+
+
+## RPC Frameworks
+
+The agent supports gRPC on .NET Core both on the client and the server side. Every gRPC call is automatically captured by the agent.
+
+Streaming is not supported; for streaming use-cases, the agent does not create transactions and spans automatically.
+
+
+
+
+ gRPC 1.7
+
+
+
+ Grpc.Net.Client 2.23.2+ _(client side)_
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
+
+
+
+
+
+ ASP.NET Core 2.1+ _(server side)_
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
+
+
+
+## Data access technologies
+
+Automatic instrumentation is supported for the following data access technologies
+
+
+
+
+ Azure CosmosDB 1.11
+
+
+
+ Microsoft.Azure.Cosmos 3.0.0+
+
+ Microsoft.Azure.DocumentDB.Core 2.4.1+
+
+ Microsoft.Azure.DocumentDB 2.4.1+
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
+
+ Entity Framework Core 1.0
+
+
+
+ Microsoft.EntityFrameworkCore 2.x+
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
+
+ Entity Framework 6 1.2
+
+
+
+ EntityFramework 6.2+
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
+
+ Elasticsearch 1.6
+
+
+
+ Elasticsearch.Net 7.6.0+
+
+ NEST 7.6.0+
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
+
+ MySQL 1.12
+
+
+
+ See profiler documentation
+
+
+
+ {/* Profiler auto instrumentation */}
+
+
+
+
+
+
+ MongoDB 1.9
+
+
+
+ MongoDB.Driver 2.4.4+
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
+
+ Oracle 1.12
+
+
+
+ See profiler documentation
+
+
+
+ {/* Profiler auto instrumentation */}
+
+
+
+
+
+
+ PostgreSQL 1.12
+
+
+
+ See profiler documentation
+
+
+
+ {/* Profiler auto instrumentation */}
+
+
+
+
+
+
+ Redis 1.8
+
+
+
+ StackExchange.Redis 2.0.495+
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
+
+ SqlClient
+
+
+
+ System.Data.SqlClient 2.0.495+ 1.8
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
+
+
+
+
+
+ See profiler documentation 1.12
+
+
+
+ {/* Profiler auto instrumentation */}
+
+
+
+
+
+
+ SQLite 1.12
+
+
+
+ See profiler documentation
+
+
+
+ {/* Profiler auto instrumentation */}
+
+
+
+
+
+
+
+
+## Messaging systems
+
+We support automatic instrumentation for the following messaging systems
+
+
+
+
+ Azure Service Bus 1.10
+
+
+
+ Microsoft.Azure.ServiceBus 3.0.0+
+
+ Azure.Messaging.ServiceBus 7.0.0+
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
+
+ Azure Queue Storage 1.10
+
+
+
+ Azure.Storage.Queues 12.6.0+
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
+
+ Kafka 1.12
+
+
+
+ See profiler documentation
+
+
+
+ {/* Profiler auto instrumentation */}
+
+
+
+
+
+
+ RabbitMQ 1.12
+
+
+
+ See profiler documentation
+
+
+
+ {/* Profiler auto instrumentation */}
+
+
+
+
+
+
+
+
+## Networking client-side technologies
+
+Automatic instrumentation for networking client-side technology means
+an HTTP span is automatically created for each outgoing HTTP request and tracing headers are propagated.
+
+| Framework | Supported versions | Integration |
+|---|---|---|
+| System.Net.Http.HttpClient 1.0 | _built-in_ | part of Elastic.Apm |
+| System.Net.HttpWebRequest 1.1 | _built-in_ | part of Elastic.Apm |
+
+
+
+## Cloud services
+
+Automatic instrumentation for the following cloud services
+
+
+
+
+ Azure CosmosDB 1.11
+
+
+
+ Microsoft.Azure.Cosmos 3.0.0+
+
+ Microsoft.Azure.DocumentDB.Core 2.4.1+
+
+ Microsoft.Azure.DocumentDB 2.4.1+
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
+
+ Azure Service Bus 1.10
+
+
+
+ Microsoft.Azure.ServiceBus 3.0.0+
+
+ Azure.Messaging.ServiceBus 7.0.0+
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
+
+ Azure Storage 1.10
+
+
+
+ Azure.Storage.Blobs 12.8.0+
+
+ Azure.Storage.Queues 12.6.0+
+
+ Azure.Storage.Files.Shares 12.6.0+
+
+
+
+ {/* NuGet package */}
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/apm-agents-net.mdx b/docs/apm-agents-net.mdx
new file mode 100644
index 0000000000..3aa5fcc0d1
--- /dev/null
+++ b/docs/apm-agents-net.mdx
@@ -0,0 +1,50 @@
+---
+id: serverlessObservabilityApmAgentsNet
+slug: /serverless/observability/apm-agents-net
+title: .NET
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+
+export let env_github = false
+
+
+
+
+For the best reading experience,
+please view this documentation at [elastic.co](https://www.elastic.co/guide/en/apm/agent/dotnet)
+
+
+
+
+
+
+The Elastic APM .NET Agent automatically measures the performance of your application and tracks errors.
+It has built-in support for the most popular frameworks,
+as well as a simple API which allows you to instrument any application.
+
+
+
+## How does the Agent work?
+
+The agent auto-instruments supported technologies and records interesting events, like HTTP requests and database queries.
+To do this, it uses built-in capabilities of the instrumented frameworks like
+[Diagnostic Source](https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.diagnosticsource?view=netcore-3.0),
+an HTTP module for IIS, or
+[IDbCommandInterceptor](https://docs.microsoft.com/en-us/dotnet/api/system.data.entity.infrastructure.interception.idbcommandinterceptor?view=entity-framework-6.2.0) for Entity Framework.
+This means that for the supported technologies, there are no code changes required beyond enabling auto-instrumentation.
+
+The Agent automatically registers callback methods for built-in Diagnostic Source events.
+With this, the supported frameworks trigger Agent code for relevant events to measure their duration and collect metadata, like DB statements, as well as HTTP related information, like the URL, parameters, and headers.
+These events, called Transactions and Spans, are sent to the APM Server.
+The APM Server converts them to a format suitable for Elasticsearch, and sends them to an Elasticsearch cluster.
+You can then use the APM app in Kibana to gain insight into latency issues and error culprits within your application.
+
+
+
+## Additional Components
+APM Agents work in conjunction with the [APM Server](((apm-guide-ref))/index.html), [Elasticsearch](((ref))/index.html), and [Kibana](((kibana-ref))/index.html).
+The [APM Guide](((apm-guide-ref))/index.html) provides details on how these components work together,
+and provides a matrix outlining [Agent and Server compatibility](((apm-guide-ref))/agent-server-compatibility.html).
diff --git a/docs/apm-agents-nodejs-api.mdx b/docs/apm-agents-nodejs-api.mdx
new file mode 100644
index 0000000000..092c3171e1
--- /dev/null
+++ b/docs/apm-agents-nodejs-api.mdx
@@ -0,0 +1,996 @@
+---
+id: serverlessObservabilityApmAgentsNodejsApi
+slug: /serverless/observability/apm-agents-nodejs-api
+title: API
+# description: Description to be written
+tags: [ 'serverless', 'observability', '' ]
+---
+
+
+{/* import { book } from './book-variables.js' */}
+
+
+
+export let env_github = false
+
+
+
+
+For the best reading experience,
+please view this documentation at [elastic.co](https://www.elastic.co/guide/en/apm/agent/nodejs/current/agent-api.html)
+
+
+
+
+The Elastic APM Node.js agent is a singleton. You get the agent instance by requiring either `elastic-apm-node` or `elastic-apm-node/start`. The agent is also returned by the {/* `.start()` */} method, which allows you to require and start the agent on the same line:
+
+```js
+const apm = require('elastic-apm-node').start(...)
+```
+
+If you need to access the `Agent` in any part of your codebase,
+you can simply require `elastic-apm-node` to access the already started singleton.
+You therefore don't need to manage or pass around the started `Agent` yourself.
+
+
+
+## `apm.start([options])`
+
+Starts the Elastic APM agent for Node.js and returns itself.
+
+
+
+For the APM agent to automatically instrument Node.js modules, it must be started before those modules are loaded. See {/* Starting the agent */} for details and possible surprises with compilers/transpilers/bundlers.
+
+
+
+See the {/* Configuration documentation */} for available options.
+
+
+
+## `apm.isStarted()`
+
+_Added in: v1.5.0_
+
+Use `isStarted()` to check if the agent has already started.
+Returns `true` if the agent has started,
+otherwise returns `false`.
+
+
+
+## `apm.getServiceName()`
+
+_Added in: v3.11.0_
+
+Get the configured {/* `serviceName` */}. If a service name was not
+explicitly configured, this value may have been automatically determined.
+The service name is not determined until `agent.start()`, so will be `undefined`
+until then. A misconfigured agent can have a `null` service name.
+
+
+
+## `apm.setFramework(options)`
+
+_Added in: v2.8.0_
+
+* `options` [`