Enable RUM on Kloudfuse for Azure Blob :: Kloudfuse Docs
Enable RUM on Kloudfuse for Azure Blob
Enable RUM session replay storage in Kloudfuse by creating an Azure Blob storage account and container, then configuring the connection credentials in your Kloudfuse deployment.
Session replay storage is optional. If you do not want session replay, skip Steps 1–2 and omit the sessionReplayStorage block in custom-values.yaml. The remaining steps enable RUM and are always required. |
Create Session Replay
You can store RUM session recordings in an Azure Blob container. Follow these steps to create a storage account and a blob container:
Follow instructions in Azure documentation on how to Create an Azure storage account.
Save for following tasks this information:
- Container Name
- Connection String for Storage Account
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-azure --from-literal=connectionString=<connectionString>
Configure the custom-values.yaml File
In the Kloudfuse UI, create your RUM application and note its application ID. You use this ID when you initialize the frontend SDK. See RUM Add New Application.
Add a
global.rumsection to thecustom-values.yamlfile:
global:
rum:
enabled: true
sessionReplayStorage:
type: azure
useSecret: true
# Below secret name references the secret created earlier
secretName: "kfuse-rum-azure" (1)
azure:
container: rum-session-replay-playground (2)
- List RUM-specific Kafka topics in the
custom-values.yamlfile.
Use the configuration for the events stream as a reference for the number of replicas and partitions.
- 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 (1)
host: playground.kloudfuse.io (2)
email: admin@kloudfuse.com
clusterIssuer: playground-letsencrypt-prod
- Specify the Ingress configuration in the
ingresssection of thecustom-values.yamlfile.
RUM must have a public ingest endpoint where the frontend browser posts data.
ingress:
controller:
service:
external:
enabled: true (1)
externalTrafficPolicy: Local (2)
- 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.
Include these rules verbatim, along with existing rules.
- 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: "=="
- transform:
args:
- action: "replace"
- sourceLabels: "#ddsource"
- targetLabel: "source"
conditions:
- matcher: "#__kf_ddrum"
value: "true"
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: Must match the ID of the RUM application you created in the Kloudfuse UI. See RUM Add New Application.clientToken: Use the string dummy as a value if the Kloudfuse installation does not have authenticated ingest enabled. If authenticated ingestion is enabled please follow the additional instructions noted on Step 5: Enable authenticated ingest below.site: Use empty string.proxy: Must be of the formhttps://<customers-kfuse-hostname>/ddrumproxy. Example: Kloudfuse Playground cluster has the value ofhttps://playground.kloudfuse.io/ddrumproxy.service: Must match the application name, and cannot contain any white space. Example: kf-frontendenv: This value depends on the type of deployment:test,production,staging, etc.version: If the frontend application has an identifier, use a string value that represents the version. Otherwise, use the default value of1.0.0.sessionSampleRate: We recommend a small number if the site has many users.enableSessionRecording: We recommend a value oftrueto use the session capture and replay feature.enableLogCollection: We recommend a value oftrueto get frontend logs into their Kloudfuse cluster.
Enable Authenticated Ingestion
(Optional)
By default, this feature is disabled.
When you enable authenticated ingestion on the Kloudfuse platform, you must enable it globally, and add authentication tokens. Follow these steps:
- To enable ingestion authentication, set
global authConfigtotruein thecustom-values.yamlfile:
global:
authConfig:
enabled: true (1)
- 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 (1)
clientTokens: (2)
- 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>', (1)
clientToken: '<unique authtoken value>', (2)
...
}
})
Add or update RUM labels used for RBAC policies
(Optional)
By default the chart uses the following RUM RBAC labels: application.id, service, env, geo.country_iso_code.
To add or update the labels used by RUM RBAC policies, edit the rumRBACLabels array in your custom-values.yaml under the global section.
Example:
global:
rumRBACLabels: ["application.id", "service", "env", "geo.country_iso_code", "<<new_label>>"]
Notes
- While the labels are configurable, it is recommended to only add attributes that have constant value across whole session.