Enable RUM on Kloudfuse for AWS S3 :: Kloudfuse Docs
Enable RUM on Kloudfuse for AWS S3
Create Session Replay
You can store RUM session recordings in an AWS S3 container. Follow these steps to create an S3 bucket:
Follow instructions in AWS documentation on Creating a bucket.
Save for following tasks this information:
- S3
accessKeyandsecretKey; use them to create a secret on the Kloudfuse. - S3
bucketNameandawsRegionwhere the bucket exists
- S3
Create Secret for Kloudfuse Namespace
Run the following command in the cluster that runs Kloudfuse:
Create a Secret for Kloudfuse Namespace
kubectl create secret generic kfuse-rum-s3 --from-literal=accessKey=<accessKey> --from-literal=secretKey='<secretKey>'
Configure the custom-values.yaml File
- Generate a UUID by running the following command:
uuidgen | tr 'A-Z' 'a-z'
| You must reference this UUID in the Kloudfuse frontend SDK initialization call. |
- Add a
global.rumsection to thecustom-values.yamlfile:
rum:
enabled: true
applications:
- name: kf-frontend
id: 944f6a58-dbc2-45ad-bf93-def505aaff62
sessionReplayStorage:
type: s3
useSecret: true
secretName: "kfuse-rum-s3"
s3:
region: us-west-2
bucket: rum-session-replay-playground
- List RUM-specific Kafka topics in the
custom-values.yamlfile.
- name: kf_rum_session_replay_topic
partitions: 3
replicationFactor: 2
- name: kf_rum_views_topic
partitions: 3
replicationFactor: 2
- name: kf_rum_actions_topic
partitions: 3
replicationFactor: 2
- name: kf_rum_resources_topic
partitions: 3
replicationFactor: 2
- name: kf_rum_longtasks_topic
partitions: 3
replicationFactor: 2
- name: kf_rum_errors_topic
partitions: 3
replicationFactor: 2
- Specify the TLS configuration in the
tlssection of thecustom-values.yamlfile, and ensure you use a publichost.
tls:
enabled: true
host: playground.kloudfuse.io
email: admin@kloudfuse.com
clusterIssuer: playground-letsencrypt-prod
- Specify the Ingress configuration in the
ingresssection of thecustom-values.yamlfile.
ingress:
controller:
service:
external:
enabled: true
externalTrafficPolicy: Local
- Enable RUM in the
ingestersection of thecustom-values.yamlfile:
ingester:
config:
rum:
enabled: true
datadog:
proxyToDatadogEnabled: false
- To ingest frontend logs into Kloudfuse, add parsing rules in the
log-parsersection of thecustom-values.yamlfile.
- remap:
args:
kf_additional_tags:
- "$origin"
- "$application_id"
- "$session_id"
- "$view.id"
- "$view.url"
- "$view.referrer"
- "$error.handling"
- "$error.kind"
- "$error.stack"
- "$error.message"
- "$http.method"
- "$http.status_code"
- "$http.url"
conditions:
- matcher: "__kf_agent"
value: "datadog"
op: "=="
- Enable RUM in the
uisection of thecustom-values.yamlfile:
ui:
config:
rum:
enabled: true
- Upgrade the cluster using these changes, and ensure that all pods are active.
Instrument the Frontend Application
To set up the Frontend SDK for RUM, see instructions in RUM Setup.
Here is guide to the parameters to configure for SDK initialization:
applicationId: '<APPLICATION_ID>'clientToken: '<CLIENT_TOKEN>'site: '<SITE>'proxy: '<KFUSE_RUM_ENDPOINT>'service: '<APPLICATION_NAME>'env: 'production'version: '1.0.0'sessionSampleRate: 100enableSessionRecording: trueenableLogCollection: true
Enable Authenticated Ingestion
(Optional)
- To enable ingestion authentication, set
global authConfigtotruein thecustom-values.yamlfile:
global:
authConfig:
enabled: true
- Generate a new authentication token:
uuidgen | tr -d '-' | tr 'A-Z' 'a-z' | sed 's/^/pub/'
- Configure one or more client tokens in the
ingester config rumsection of thecustom-values.yamlfile:
ingester:
config:
rum:
enabled: true
clientTokens:
- rumauthkey1: <unique authtoken value>
- rumauthkey2: <unique authtoken value>
- Match the generated auth tokens to the
clientTokenvalue in the frontend RUM SDK configuration:
kfuseRumSDK.init({
config: {
applicationId: '<application id>',
clientToken: '<unique authtoken value>',
...
}
})