# elasticApm not sending data

**URL:** <https://discuss.elastic.co/t/elasticapm-not-sending-data/225683>\
**Category:** APM\
**Tags:** rum\
**Created:** [March 30, 2020, 1:36pm UTC](https://discuss.elastic.co/t/elasticapm-not-sending-data/225683 "2020-03-30T13:36:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![inandi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inandi/32/40801_2.png) [@inandi](https://discuss.elastic.co/u/inandi)\
**Post date:** [March 30, 2020, 1:36pm UTC](https://discuss.elastic.co/t/elasticapm-not-sending-data/225683/1 "2020-03-30T13:36:59Z")

</div>

**Kibana version** : 7.6.1

**Elasticsearch version** : 7.6.1

**APM Server version** : 7.6.1

**Browser version** : chrome, Version 80.0.3987.149 (Official Build) (64-bit)

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**: brew

**Fresh install or upgraded from other version?** fresh

I am not getting any data in APM-agent for my vagrant machine. first, I have tried with given example in documentation and then I created one single file in both cases I got data,

 ![Screenshot 2020-03-30 at 6.45.14 PM](https://us1.discourse-cdn.com/elastic/original/3X/2/f/2f591a8f5015b4932391b60e9d0d9efb6c6f6e40.png)

but my actual requirement is to setup this in vagrant box. so I have written an RUM agent with HTML configuration.

```auto
     <script>
        elasticApm.init({
            serviceName: 'osett',
            serverUrl: 'http://127.0.0.1:8200/',
            serviceVersion: '0.90'
        })
    </script>

```

in this case, if I console the "elasticApm" object, I am getting a JSON which tells "\_initialized: true"

```auto
{
	"_disable":false,
	"serviceFactory":{
		"_serviceCreators":{

		},
		"_serviceInstances":{
			"PatchUtils":{
				"globalState":{
					"fetchInProgress":false
				},
				"XHR_IGNORE":" __apm_symbol__ xhrIgnore",
				"XHR_SYNC":" __apm_symbol__ xhrSync",
				"XHR_URL":" __apm_symbol__ xhrURL",
				"XHR_METHOD":" __apm_symbol__ xhrMethod"
			},
			"Utils":{

			},
			"ConfigService":{
				"config":{
					"serviceName":"osett",
					"serviceVersion":"0.90",
					"environment":"",
					"agentName":"js-base",
					"agentVersion":"4.0.0",
					"serverUrl":"http://127.0.0.1:8200/",
					"serverUrlPrefix":"/intake/v2/rum/events",
					"active":true,
					"debug":false,
					"logLevel":"warn",
					"browserResponsivenessInterval":500,
					"browserResponsivenessBuffer":3,
					"checkBrowserResponsiveness":true,
					"groupSimilarSpans":true,
					"similarSpanThreshold":0.05,
					"capturePageLoad":true,
					"ignoreTransactions":[

					],
					"errorThrottleLimit":20,
					"errorThrottleInterval":30000,
					"transactionThrottleLimit":20,
					"transactionThrottleInterval":30000,
					"transactionDurationThreshold":60000,
					"queueLimit":-1,
					"flushInterval":500,
					"sendPageLoadTransaction":true,
					"serverStringLimit":1024,
					"distributedTracing":true,
					"distributedTracingOrigins":[

					],
					"distributedTracingHeaderName":"elastic-apm-traceparent",
					"transactionSampleRate":1,
					"context":{

					},
					"platform":{

					}
				},
				"defaults":{
					"serviceName":"",
					"serviceVersion":"",
					"environment":"",
					"agentName":"js-base",
					"agentVersion":"4.0.0",
					"serverUrl":"http://localhost:8200",
					"serverUrlPrefix":"/intake/v2/rum/events",
					"active":true,
					"debug":false,
					"logLevel":"warn",
					"browserResponsivenessInterval":500,
					"browserResponsivenessBuffer":3,
					"checkBrowserResponsiveness":true,
					"groupSimilarSpans":true,
					"similarSpanThreshold":0.05,
					"capturePageLoad":true,
					"ignoreTransactions":[

					],
					"errorThrottleLimit":20,
					"errorThrottleInterval":30000,
					"transactionThrottleLimit":20,
					"transactionThrottleInterval":30000,
					"transactionDurationThreshold":60000,
					"queueLimit":-1,
					"flushInterval":500,
					"sendPageLoadTransaction":true,
					"serverStringLimit":1024,
					"distributedTracing":true,
					"distributedTracingOrigins":[

					],
					"distributedTracingHeaderName":"elastic-apm-traceparent",
					"transactionSampleRate":1,
					"context":{

					},
					"platform":{

					}
				},
				"_changeSubscription":{
					"subscriptions":[
						null
					]
				},
				"filters":[

				]
			},

.................
.................

],
"isHardNavigation":true,
"browserResponsivenessCounter":6,
"context":{
	"page":{
		"referer":"https://telesales.dev.dynacommerce.io/agent/account/login/",
		"url":"https://telesales.dev.dynacommerce.io/"
	}
}
},
"_subscription":{
	"subscriptions":[
		null
	]
},
"_alreadyCapturedPageLoad":true
},

................
................

"_alreadyCapturedPageLoad":true
}
}
},
"initialized":true
},
"_initialized":true
}

```

BUT, i can not see agent "osett" in kibana.

---

<div class="post-metadata">

**Author:** ![vigneshshanmugam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vigneshshanmugam/32/40324_2.png) [@vigneshshanmugam](https://discuss.elastic.co/u/vigneshshanmugam)\
**Post date:** [March 31, 2020, 10:55am UTC](https://discuss.elastic.co/t/elasticapm-not-sending-data/225683/2 "2020-03-31T10:55:57Z")

</div>

Hi @inandi,

Thanks for using the RUM agent and the details. Could you enable the debug logs in the agent and check if the agent is successfully creating the transactions/errors?

`logLevel: debug` - [https://www.elastic.co/guide/en/apm/agent/rum-js/current/configuration.html#log-level](https://www.elastic.co/guide/en/apm/agent/rum-js/current/configuration.html#log-level)

Thanks,  
Vignesh

---

<div class="post-metadata">

**Author:** ![inandi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inandi/32/40801_2.png) [@inandi](https://discuss.elastic.co/u/inandi)\
**Post date:** [March 31, 2020, 12:47pm UTC](https://discuss.elastic.co/t/elasticapm-not-sending-data/225683/3 "2020-03-31T12:47:38Z")

</div>

@vigneshshanmugam thank you for early reply 🙂 after adding your suggestion

```auto
    <script>
        elasticApm.init({
            serviceName: 'osettrr2',
            serverUrl: 'http://192.168.1.4:8200',
            serviceVersion: '0.90',
            logLevel: 'debug'
        })
    </script> 

```

but I am not sure, what happened!!! I didn't get anything different.

---

<div class="post-metadata">

**Author:** ![vigneshshanmugam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vigneshshanmugam/32/40324_2.png) [@vigneshshanmugam](https://discuss.elastic.co/u/vigneshshanmugam)\
**Post date:** [April 1, 2020, 9:02am UTC](https://discuss.elastic.co/t/elasticapm-not-sending-data/225683/4 "2020-04-01T09:02:40Z")

</div>

@inandi Once you have the `logLevel: 'debug'` , you would be able to see debug logs on the browser console. If you are not seeing it, then you might need to use the bundle with `NODE_ENV` set to `development` as debug logs are only enabled for dev builds.

You can use this script - [https://github.com/elastic/apm-agent-rum-js/releases/download/%40elastic%2Fapm-rum%405.0.0/elastic-apm-rum.umd.js](https://github.com/elastic/apm-agent-rum-js/releases/download/%40elastic%2Fapm-rum%405.0.0/elastic-apm-rum.umd.js)

More details here - [https://www.elastic.co/guide/en/apm/agent/rum-js/current/install-the-agent.html#using-production-build](https://www.elastic.co/guide/en/apm/agent/rum-js/current/install-the-agent.html#using-production-build)

Also, could you please check if the agent is sending the events to the APM server? You can see this from the developer tools network tab.

Thanks,  
Vignesh

---

<div class="post-metadata">

**Author:** ![inandi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/inandi/32/40801_2.png) [@inandi](https://discuss.elastic.co/u/inandi)\
**Post date:** [April 2, 2020, 7:14am UTC](https://discuss.elastic.co/t/elasticapm-not-sending-data/225683/5 "2020-04-02T07:14:02Z")

</div>

> [@vigneshshanmugam](#):
>
> Also, could you please check if the agent is sending the events to the APM server? You can see this from the developer tools network tab.

only when first time i reload the page, it calls the event. but it shows "provisional header are shown"

 ![Screenshot 2020-03-30 at 8.27.27 PM](https://us1.discourse-cdn.com/elastic/original/3X/4/0/409a6d1efd84669fad3f86473a1bbb57ca43ed6a.png)

I hope this is what you are asking here. I will do the rest you mentioned in your comment. thanks for your help !!!!

---

<div class="post-metadata">

**Author:** ![vigneshshanmugam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vigneshshanmugam/32/40324_2.png) [@vigneshshanmugam](https://discuss.elastic.co/u/vigneshshanmugam)\
**Post date:** [April 6, 2020, 9:27am UTC](https://discuss.elastic.co/t/elasticapm-not-sending-data/225683/6 "2020-04-06T09:27:37Z")

</div>

@inandi From the request, It seems like the payload is being sent to the APM server, I would do two things here

- Check APM server logs for any errors.
- Use the latest RUM agent version which is `5.0.0`. Saying because you might be using an incompatible version of RUM agent against APM server.

[https://www.elastic.co/guide/en/apm/agent/rum-js/current/upgrade-to-v5.html#v5-upgrade-server](https://www.elastic.co/guide/en/apm/agent/rum-js/current/upgrade-to-v5.html#v5-upgrade-server)

Thanks,  
Vignesh

---

<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:** [April 27, 2020, 5:27am UTC](https://discuss.elastic.co/t/elasticapm-not-sending-data/225683/7 "2020-04-27T05:27:43Z")

</div>

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