# APM Configuration

**URL:** <https://discuss.elastic.co/t/apm-configuration/145498>\
**Category:** APM\
**Created:** [August 22, 2018, 7:09am UTC](https://discuss.elastic.co/t/apm-configuration/145498 "2018-08-22T07:09:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishnuduttpv](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vishnuduttpv](https://discuss.elastic.co/u/vishnuduttpv)\
**Post date:** [August 22, 2018, 7:09am UTC](https://discuss.elastic.co/t/apm-configuration/145498/1 "2018-08-22T07:09:25Z")

</div>

Hi,  
I have installed a new apm server with the following configurations,  
APM Server - [http://my-apmserver:8200](http://my-apmserver:8200)

The APM Agent is node.js and added the following to the first file that is loaded in my application.

```
module.exports = {
  // Set required service name (allowed characters: a-z, A-Z, 0-9, -, _, and space)
  serviceName: '',

  // Use if APM Server requires a token
  secretToken: '',

  // Set custom APM Server URL (default: http://localhost:8200)
  serverUrl: 'http://my-apmserver:8200'
}

```

I have not provided any service name in the code.  
And started the apm.ES and application.  
But my Kibana APM dashboards are empty. Nothing gets populated in the dashboards.  
Is there anything iam missing?  
Request to advise!

Thanks

---

<div class="post-metadata">

**Author:** ![jalvz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalvz/32/45613_2.png) [@jalvz](https://discuss.elastic.co/u/jalvz)\
**Post date:** [August 22, 2018, 7:33am UTC](https://discuss.elastic.co/t/apm-configuration/145498/2 "2018-08-22T07:33:29Z")

</div>

Hi!

Thanks for trying Elastic APM! You are indeed missing the `serviceName`, that is a required parameter so then you can see your service in Kibana.  
You might observe that APM Server is returning 400 response codes to your app because of that.

Also check out the documentation, hopefully it can point you to the right direction, specifically: [https://www.elastic.co/guide/en/apm/server/master/common-problems.html](https://www.elastic.co/guide/en/apm/server/master/common-problems.html)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![vishnuduttpv](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vishnuduttpv](https://discuss.elastic.co/u/vishnuduttpv)\
**Post date:** [August 22, 2018, 12:28pm UTC](https://discuss.elastic.co/t/apm-configuration/145498/3 "2018-08-22T12:28:28Z")

</div>

Thanks @jalvz!  
I have already provided the service name and changed the agent type to JS and done accordingly.  
The developers are analyzing the code and later I will update.

Thanks

---

<div class="post-metadata">

**Author:** ![vishnuduttpv](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vishnuduttpv](https://discuss.elastic.co/u/vishnuduttpv)\
**Post date:** [August 30, 2018, 7:10am UTC](https://discuss.elastic.co/t/apm-configuration/145498/4 "2018-08-30T07:10:18Z")

</div>

Hi @jalvz ,  
I had configured the APM server and added the agents. The apm server is getting prompted with the following error in the logs.  
Request to advise,

> beater/beater.go:172 self instrumentation is disabled  
> 2018-08-27T12:40:02.253+0530 INFO [handler] beater/handlers.go:161 Path /v1/rum/sourcemaps added to request handler  
> 2018-08-27T12:40:02.253+0530 INFO [handler] beater/handlers.go:161 Path /v1/transactions added to request handler  
> 2018-08-27T12:40:02.253+0530 INFO [handler] beater/handlers.go:161 Path /v1/client-side/transactions added to request handler  
> 2018-08-27T12:40:02.253+0530 INFO [handler] beater/handlers.go:161 Path /v1/errors added to request handler  
> 2018-08-27T12:40:02.254+0530 INFO [handler] beater/handlers.go:161 Path /v1/client-side/errors added to request handler  
> 2018-08-27T12:40:02.254+0530 INFO [handler] beater/handlers.go:161 Path /v1/rum/errors added to request handler  
> 2018-08-27T12:40:02.254+0530 INFO [handler] beater/handlers.go:161 Path /v1/metrics added to request handler  
> 2018-08-27T12:40:02.254+0530 INFO [handler] beater/handlers.go:161 Path /v1/rum/transactions added to request handler  
> 2018-08-27T12:40:02.254+0530 INFO [handler] beater/handlers.go:161 Path /v1/client-side/sourcemaps added to request handler  
> 2018-08-27T12:40:02.280+0530 INFO [server] beater/server.go:69 Starting apm-server [59fbf0b6146ca5c50a94d1c435d0cf704e5b2a3f built 2018-08-17 22:13:22 +0000 UTC]. Hit CTRL-C to stop it.  
> 2018-08-27T12:40:02.280+0530 INFO [server] beater/server.go:70 Listening on: my-apm--server:8200  
> 2018-08-27T12:40:02.280+0530 INFO [server] beater/server.go:75 RUM endpoints disabled  
> 2018-08-27T12:40:02.281+0530 INFO [request] beater/handlers.go:282 handled request {"request\_id": "2cfa7ce7-0ca5-4776-a3ee-a032a15c92e0", "method": "GET", "URL": "/healthcheck", "content\_length": 0, "remote\_address": "x.x.x.x", "user-agent": "Go-http-client/1.1", "response\_code": 200}  
> 2018-08-27T12:40:02.281+0530 INFO [http\_client] beater/client.go:49 HTTP Server ready  
> 2018-08-27T12:40:02.281+0530 INFO [onboarding] beater/onboarding.go:36 Publishing onboarding document  
> 2018-08-27T12:40:03.323+0530 INFO elasticsearch/client.go:708 Connected to Elasticsearch version 6.4.0  
> 2018-08-27T12:40:03.430+0530 INFO template/load.go:82 Loading template for Elasticsearch version: 6.4.0  
> 2018-08-27T12:40:04.857+0530 INFO template/load.go:145 Elasticsearch template with name 'apm-6.4.0' loaded  
> 2018-08-30T12:25:15.380+0530 ERROR [request] beater/handlers.go:452 error handling request {"request\_id": "80bcc8b8-dd5b-465e-9f00-7f1f532edd10", "method": "OPTIONS", "URL": "/v1/client-side/errors", "content\_length": 0, "remote\_address": "", "user-agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36", "response\_code": 403, "error": "forbidden request: endpoint is disabled"}

Thanks

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [August 30, 2018, 7:17am UTC](https://discuss.elastic.co/t/apm-configuration/145498/5 "2018-08-30T07:17:52Z")

</div>

It looks like you try to use the RUM endpoint, which is disabled by default. You can enable it by setting `apm-server.rum.enabled: true` in your configuration file `apm-server.yml`. Find more information about [setting up RUM](https://www.elastic.co/guide/en/apm/server/current/configuration-rum.html).

---

<div class="post-metadata">

**Author:** ![vishnuduttpv](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vishnuduttpv](https://discuss.elastic.co/u/vishnuduttpv)\
**Post date:** [August 30, 2018, 7:33am UTC](https://discuss.elastic.co/t/apm-configuration/145498/6 "2018-08-30T07:33:40Z")

</div>

Thanks @simitt!  
I missed that doc! Thanks. Its working now! But I am having a sourcemap error!

> failed to apply sourcemap Sourcemap Key Error for Service Name: 'APM\_REG\_TEST', Service Version: '' and Path: ''  
> 2018-08-30T13:02:21.402+0530 ERROR [stacktrace] model/stacktrace\_frame.go:219 Sourcemap Key Error for Service Name: 'APM\_REG\_TEST', Service Version: '' and Path: ''

Request to advise!

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [August 30, 2018, 7:48am UTC](https://discuss.elastic.co/t/apm-configuration/145498/7 "2018-08-30T07:48:24Z")

</div>

Have you uploaded the according sourcemap? It looks like the stacktrace frame cannot be mapped to any sourcemap. Please see how you can [upload sourcemaps](https://www.elastic.co/guide/en/apm/server/current/sourcemap-api.html) and how [sourcemaps get applied](https://www.elastic.co/guide/en/apm/server/current/sourcemaps.html).

Let me know if that helps.

---

<div class="post-metadata">

**Author:** ![vishnuduttpv](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vishnuduttpv](https://discuss.elastic.co/u/vishnuduttpv)\
**Post date:** [August 30, 2018, 7:57am UTC](https://discuss.elastic.co/t/apm-configuration/145498/8 "2018-08-30T07:57:30Z")

</div>

Hi @simitt,  
Thanks for the reply.  
Still having a little doubt about the sourcemaps.  
From my understanding please find the points,  
So the sourcemaps will be different for each applications!  
For each applications we will require to upload the respective mapping to the apm server!  
The source map is a pure thing that is related with the backend development of the aplication !

Once the source map is uploaded into the apm server, it automatically checks for the uploaded data and the logs shiped from the aplpication !

Request to correct if iam wrong!  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [August 30, 2018, 8:12am UTC](https://discuss.elastic.co/t/apm-configuration/145498/9 "2018-08-30T08:12:53Z")

</div>

@vishnuduttpv, if you want a source map to be applied, you first need to upload it. The combination of the `service_name`, `service_version` and `bundle_filepath` build the unique id for a source map. This means you need to upload a source map per service (app) version and file path.

In case no source map is found for a stacktrace frame, the data are still ingested, just without source mapping being applied.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 20, 2018, 4:12am UTC](https://discuss.elastic.co/t/apm-configuration/145498/10 "2018-09-20T04:12:53Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
