Agent for PHP application
Downloading the Agent
- Download the files sixthSenseConfig.js and ssindex.js files. Contact Customer Support for the PHP link. Since the npm library is not installed in PHP, we can't install the agent using the npm command.
The link to download the files is as follows:
curl --header "PRIVATE-TOKEN::{{PRIVATE_TOKEN}}" --output sixthsense.tar.gz "https://artifacts-observability.sixthsense.rakuten.com/api/v4/projects/9/packages/generic/sixthsense-javascript-agent-min-js/{{AGENT_VERSION}}/sixthsense.tar.gz"
Untar the downloaded agent file using the
tar -xvzf sixthsense.tar.gz
command:Copy both the files to the js folder under resources in the application source code.
Change the necessary parameters (service, collector, authorization) in the SixthSenseConfig.js file.
Import both the js file in a common PHP file (if not a common PHP view then in all PHP view files) in the bottom (IMPORTANT).
note
The following scripts in the example must be executed in the same order.
For example:
<!-- SixthSense Script -->
<script src="{hostname}/ssindex.js" type="text/javascript"></script>
<script src="{hostname}/SixthSenseConfig.js" type="text/javascript"></script>
</body>
</html>