From 83d7b48e1f9d0c859d2d007149d6e74df3f344ea Mon Sep 17 00:00:00 2001 From: Colleen McGinnis Date: Mon, 4 Dec 2023 12:21:24 -0600 Subject: [PATCH 1/3] docs: Update source map documentation (#12131) * attempt to address #11574 * attempt to address #11568 * address feedback from @simitt * Update docs/source-map-how-to.asciidoc --- apm-server.yml | 10 +++------- docs/source-map-how-to.asciidoc | 23 +++++++++++++++++------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/apm-server.yml b/apm-server.yml index 590624c9724..35800aafd13 100644 --- a/apm-server.yml +++ b/apm-server.yml @@ -170,14 +170,10 @@ apm-server: # Note that values configured without a time unit will be interpreted as seconds. #cache.expiration: 5m - # Source maps may be fetched from Elasticsearch by using the output.elasticsearch configuration, - # and running apm-server standalone. + # Source map retrieval location. # - # Note: fetching source maps from Elasticsearch is not supported if apm-server is being managed by - # Fleet. This configuration is only applicable to standalone apm-servers, for backwards compatibility - # with source maps stored in Elasticsearch by older versions of apm-server. New source maps must now - # be uploaded via Kibana, and `apm-server.kibana` configured in standalone apm-servers for fetching - # them. + # If using an output other than Elasticsearch that is writing to Elasticsearch, you must + # set this option. If not set, the standard output elasticsearch configuration is used. #elasticsearch: # Array of hosts to connect to. # Scheme and port can be left out and will be set to the default (`http` and `9200`). diff --git a/docs/source-map-how-to.asciidoc b/docs/source-map-how-to.asciidoc index a0bc2a4675b..c8b03a785d2 100644 --- a/docs/source-map-how-to.asciidoc +++ b/docs/source-map-how-to.asciidoc @@ -95,19 +95,21 @@ module.exports = { [float] [[source-map-rum-upload]] -=== Upload the source map to {kib} +=== Upload the source map + +TIP: When uploading a source map, ensure that RUM support is enabled in the APM integration. {kib} exposes a {kibana-ref}/rum-sourcemap-api.html[source map endpoint] for uploading source maps. Source maps can be uploaded as a string, or as a file upload. -Before uploading a source map, ensure that RUM support is enabled in the APM integration Let's look at two different ways to upload a source map: curl and a custom application. Each example includes the four fields necessary for APM Server to later map minified code to its source: -* `service_name` - Should match the `serviceName` from step one -* `service_version` - Should match the `serviceVersion` from step one -* `bundle_filepath` - The absolute path of the final bundle as used in the web application -* `sourcemap` - The location of the source map. +* `service_name`: Should match the `serviceName` from step one. +* `service_version`: Should match the `serviceVersion` from step one. +* `bundle_filepath`: The absolute path of the final bundle as used in the web application. +* `sourcemap`: The location of the source map. + If you have multiple source maps, you'll need to upload each individually. [float] @@ -164,3 +166,12 @@ request.post({url: 'http://localhost:5601/api/apm/sourcemaps',formData: formData } }) ---- + +[float] +[[source-map-next]] +=== What happens next + +Source maps are stored in {es}. When you upload a source map, a new {es} document is created +containing the contents of the source map. +When a RUM request comes in, APM Server will make use of these source map documents to apply the +source map logic to the event's stack traces. From 40215f24a80c791b4528e0c78963bb5df88cfe9e Mon Sep 17 00:00:00 2001 From: apmmachine <58790750+apmmachine@users.noreply.github.com> Date: Mon, 4 Dec 2023 18:30:41 -0500 Subject: [PATCH 2/3] [updatecli] Bump elastic stack version to 8.12.0-9d443b17 (#12135) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Update k8s stack yaml files Made with ❤️️ by updatecli * chore: Update docker-compose.yml Made with ❤️️ by updatecli * chore: Update k8s stack yaml files Made with ❤️️ by updatecli * chore: Update docker-compose.yml Made with ❤️️ by updatecli * chore: Update k8s stack yaml files Made with ❤️️ by updatecli * chore: Update docker-compose.yml Made with ❤️️ by updatecli --------- Co-authored-by: apmmachine Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- docker-compose.yml | 6 +++--- testing/infra/k8s/base/stack/apm-server.yaml | 2 +- testing/infra/k8s/base/stack/elasticsearch.yaml | 2 +- testing/infra/k8s/base/stack/kibana.yaml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 433c6b16e68..8528689b29e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ x-logging: &default-logging max-size: "1g" services: elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0-ec4853e4-SNAPSHOT + image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0-9d443b17-SNAPSHOT ports: - 9200:9200 healthcheck: @@ -41,7 +41,7 @@ services: logging: *default-logging kibana: - image: docker.elastic.co/kibana/kibana:8.12.0-ec4853e4-SNAPSHOT + image: docker.elastic.co/kibana/kibana:8.12.0-9d443b17-SNAPSHOT ports: - 5601:5601 healthcheck: @@ -60,7 +60,7 @@ services: logging: *default-logging metricbeat: - image: docker.elastic.co/beats/metricbeat:8.12.0-ec4853e4-SNAPSHOT + image: docker.elastic.co/beats/metricbeat:8.12.0-9d443b17-SNAPSHOT environment: ELASTICSEARCH_HOSTS: '["http://elasticsearch:9200"]' ELASTICSEARCH_USERNAME: "${KIBANA_ES_USER:-admin}" diff --git a/testing/infra/k8s/base/stack/apm-server.yaml b/testing/infra/k8s/base/stack/apm-server.yaml index 470c08595e9..9b2ab7a9118 100644 --- a/testing/infra/k8s/base/stack/apm-server.yaml +++ b/testing/infra/k8s/base/stack/apm-server.yaml @@ -3,7 +3,7 @@ kind: ApmServer metadata: name: apm-server spec: - version: 8.12.0-ec4853e4-SNAPSHOT + version: 8.12.0-9d443b17-SNAPSHOT count: 1 http: tls: diff --git a/testing/infra/k8s/base/stack/elasticsearch.yaml b/testing/infra/k8s/base/stack/elasticsearch.yaml index e1029eb56e0..3ae637f355f 100644 --- a/testing/infra/k8s/base/stack/elasticsearch.yaml +++ b/testing/infra/k8s/base/stack/elasticsearch.yaml @@ -3,7 +3,7 @@ kind: Elasticsearch metadata: name: elasticsearch spec: - version: 8.12.0-ec4853e4-SNAPSHOT + version: 8.12.0-9d443b17-SNAPSHOT auth: fileRealm: - secretName: elasticsearch-admin diff --git a/testing/infra/k8s/base/stack/kibana.yaml b/testing/infra/k8s/base/stack/kibana.yaml index 43bcba5c0d7..5e96369c2f1 100644 --- a/testing/infra/k8s/base/stack/kibana.yaml +++ b/testing/infra/k8s/base/stack/kibana.yaml @@ -3,7 +3,7 @@ kind: Kibana metadata: name: kibana spec: - version: 8.12.0-ec4853e4-SNAPSHOT + version: 8.12.0-9d443b17-SNAPSHOT count: 1 elasticsearchRef: name: elasticsearch From 4f80570215d8a13a97bd2ce0c1082ca055396e9c Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 23:50:16 +0000 Subject: [PATCH 3/3] typo fix (serer -> server) (#12148) (#12149) (cherry picked from commit 2d4a6454ec9b0cd4b140b53df62c1904e199bd84) Co-authored-by: Karel Vervaeke Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- docs/configure/general.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configure/general.asciidoc b/docs/configure/general.asciidoc index 92507f8ab72..b8c4ae56c8d 100644 --- a/docs/configure/general.asciidoc +++ b/docs/configure/general.asciidoc @@ -142,7 +142,7 @@ Enabled by default. (bool) Sets the default service environment to associate with data and requests received from agents which have no service environment defined. Default: none. (text) |==== -| APM Server binary | `apm-serer.default_service_environment` +| APM Server binary | `apm-server.default_service_environment` | Fleet-managed | `Default Service Environment` |====