You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/MONITORING.md
+3-63Lines changed: 3 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,7 @@
3
3
*[Frontend monitoring](#introduction)
4
4
1.[Getting your APM Server URL](#1-getting-your-apm-server-url)
5
5
2.[Using the /public/init-js script](#2-using-the-publicinit-js-script)
6
-
3.[Cloning private git repo using Kubernetes initContainers and Kubernetes Secrets](#3-cloning-private-git-repo-using-kubernetes-initcontainers-and-kubernetes-secrets)
7
-
4.[Web server configuration (optional)](#4-web-server-configuration-optional)
8
-
5.[References](#5-references)
6
+
3.[References](#3-references)
9
7
10
8
11
9
## Frontend monitoring <aname="introduction"></a>
@@ -37,7 +35,7 @@ The __compas-open-scd__ project features a reference to an "empty" javascript re
37
35
38
36
This init javascript file has the purpose to allow for dynamic configuration of each compas-open-scd deployment.
39
37
40
-
In a private repository create a copy of `init.js`(or edit if you already have your own copy of the file with custom init scripts) in a folder, let's call it `path-to-init-js` and add the following code:
38
+
Make sure to include in your `init.js` file the following code:
### 3. Cloning private git repo using Kubernetes initContainers and Kubernetes Secrets <aname="init-containers"></a>
60
-
Start by generating a personal acccess token in Github and make sure you authorize your token to access your private repo (configure SSO if needed), your token must have checked the write:packages scope checkbox.
Now apply changes to deployment with the new persistent volume init:
107
-
108
-
```sh
109
-
kubectl apply -f your-yaml-template.yaml
110
-
```
111
-
112
-
Your pod should be up now with an initContainer that clones your private repo and copies the contents of `/path-to-init-js/` to compas-open-scd's `/app/public/init-js/`.
113
-
114
-
### 4. Web server configuration (optional) <aname="web-server"></a>
115
-
If you're using a web server like nginx or apache and the APM Server runs in an origin different than your server's origin, make sure to [configure CORS](https://www.elastic.co/guide/en/apm/agent/rum-js/master/configuring-cors.html) or setup a directive that allows for POST, OPTIONS http requests to your `serverUrl`.
116
-
117
-
### 5. References <aname="references"></a>
57
+
### 3. References <aname="references"></a>
118
58
119
59
*[Full documentation about APM Real User Monitoring JavaScript Agent](https://www.elastic.co/guide/en/apm/agent/rum-js/5.x/intro.html)
0 commit comments