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.

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:

  1. Follow instructions in Azure documentation on how to Create an Azure storage account.

  2. 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:

kubectl create secret generic kfuse-rum-azure --from-literal=connectionString=<connectionString>

Configure the custom-values.yaml File

  1. 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.
  1. Add a global.rum section to the custom-values.yaml file:
     rum:
       enabled: true
       applications:
      - name: kf-frontend
        id: 944f6a58-dbc2-45ad-bf93-def505aaff62

sessionReplayStorage:
      type: azure
      useSecret: true

# Below secret name references the secret created earlier
      secretName: "kfuse-rum-azure"
      azure:
        container: rum-session-replay-playground
1 secretName: Secret created in Create Secret for Kloudfuse Namespace.
2 container: Container created for session replay storage, in Create Session Replay.
  1. List RUM-specific Kafka topics in the custom-values.yaml file.
    - 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
  1. Specify the TLS configuration in the tls section of the custom-values.yaml file, and ensure you use a public host.
tls:
     enabled: true
     host: playground.kloudfuse.io
     email: admin@kloudfuse.com
     clusterIssuer: playground-letsencrypt-prod
1 enabled: true: Enable TLS.
2 host: playground.kloudfuse.io: This host is public.
  1. Specify the Ingress configuration in the ingress section of the custom-values.yaml file.
ingress:
     controller:
       service:
         external:
           enabled: true
         externalTrafficPolicy: Local
1 Enable external ingress policy.
2 Enable and specify external traffic policy.
  1. Enable RUM in the ingester section of the custom-values.yaml file:
ingester:
     config:
       rum:
         enabled: true
         # you can ignore the datadog section below from the PR since
         # this is the default
         datadog:
           proxyToDatadogEnabled: false
  1. To ingest frontend logs into Kloudfuse, add parsing rules in the log-parser section of the custom-values.yaml file.
      - 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: "=="
      - moveLabelToFacet:
          args:
            - name: "error.kind"
            - facetName: "error_kind"
            - agentFacet: true
          conditions:
            - matcher: "#__kf_ddrum"
              value: "true"
              op: "=="
    ...
  1. Enable RUM in the ui section of the custom-values.yaml file:
ui:
     config:
       rum:
         enabled: true
  1. 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:

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.

  1. To enable ingestion authentication, set global authConfig to true in the custom-values.yaml file:
global:
     authConfig:
       enabled: true
  1. Generate a new authentication token:
uuidgen | tr -d '-' | tr 'A-Z' 'a-z' | sed 's/^/pub/'
  1. Configure one or more client tokens in the ingester config rum section of the custom-values.yaml file:
ingester:
     config:
       rum:
         enabled: true
         clientTokens:
        - rumauthkey1: <unique authtoken value>
        - rumauthkey2: <unique authtoken value>
  1. Match the generated auth tokens to the clientToken value in the frontend RUM SDK configuration:
kfuseRumSDK.init({
       config: {
           applicationId: '<application id>',
           clientToken: '<unique authtoken value>',
           ...
       }
})

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