Splunk AppDynamics

Appdynamics initialization in angular component

Subhajit_Rajak
Engager

Hi,

I want to send custom user data from components dynamically.

How can I initialize appdynamics in a component instead of index.html?

Labels (3)
Tags (2)

Xiangning_Mao
Path Finder

Hi Subhajit,

Thanks for posting question to our community!

I made a angular demo with javascript agent involved in component.

Here is the template of my component.ts

image.png

As you can see in my demo, I created element called "script" and added it into "target" by using getElementById method.
(I added a div tag in index.html beforehand and its id is target)

Then I wrote a text which including all necessary information for javascript agent configuration.

Also I added some custom user data into PageView and saved it into config.userEventInfo in the text.

Then as you can see the screenshot of my controller, you can find some custom user data and my javascript agent started up normally.

image.png

Please note that although you can add javascript agent configuration into other child components, it won't monitor your browser until you have accessed the virtual page(defined by your child component) for the first time.
So it's necessary to add javascript into parent page(defined by app.component.ts)

Here is the documentation about adding Custom User Data to a Page Browser Snapshot(Shown up in your controller UI)
https://docs.appdynamics.com/appd/4.5.x/en/end-user-monitoring/browser-monitoring/browser-real-user-...

Hope this answer helps! 

Best regards,
Xiangning

Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...