- URL/IP of the SixthSense collector (your tenant URL which will be provided by Customer Support)
- Access token from the SixthSense portal. For accessing the token, see Accessing your Access Token.
- PACKAGE_TOKEN provided by Customer Support.
Downloading the agent
Configuring the agent
Agent configurations will be added to the entry point of your application.
|Name of the application (must be same for both)
|(tenant URL which will be provided by the onboarding team)
|Get the access token from the SixthSense portal
- Upgrade the following in mains.ts file.
- Update the app.component.ts
- Update the app.module.ts
Add only if you are using global error handler.
Rakuten does not recommended hardcoding the authorization token in the codebase. In order to make it dynamic, you can use the following method.
- Add the token to .env file as SS_AUTH_TOKEN or any other way so that your Webpack picks it from the environment variable while generating the bundle.
- In your code base use it as
process.env.SS_AUTH_TOKENinstead of hardcoding the actual token in your code.
- Ensure that you add to .env while building your bundle and not after building UI bundle.
- Get Access token. For accessing the token, see Accessing your Access Token.
- Add access token to the token_from_ui.
Run your application
- Run the following commands before the npm install command.
- PACKAGE_TOKEN which will be provided by Customer Support.
- Run the start command to run your application.
Installing on a Docker
For agent integration in Docker, follow the procedure in Agent Configuration.
Adding the dependency download configuration in Docker file
- The SixthSense agent is hosted in Rakuten self-hosted private Package manager. To download the package, an additional step is required for authentication.
- Add the following code snippet in your docker file before the npm install command.
- This will set the configuration to identify the SixthSense package registry. It also tells the dependency to download from the URL which you defined with the same name in the package.json file.
- SixthSense package manager URL - https://artifacts-observability.sixthsense.rakuten.com/api/v4/projects/9/packages/npm/
- _authToken' "PACKAGE_TOKEN"– Since the package is hosted in a private package manager, it requires some authentication to identify the user. This auth token will be defined during onboarding.
- For ease, the auth token is placed in the docker file. However, if you don’t wish to add in the docker file and push it to your version control repository, you can pass this auth token based on your credential management by setting the environment variable, passing the secrets from Jenkins CI/CD, and so on.
- Build your application with Docker build and run the Docker image/container. The agent is integrated with your application and you will start seeing the metrics in the SixthSense dashboard.
Pass the PACKAGE_TOKEN as build arguments.
Example: Docker Configuration
Using Bundle for jQuery and HTML:
- Download bundle.js to resources/ static folder.
- Add the bundle to HTML page script tag.
- Add the SixthSense code.