Uploaded image for project: 'OpenShift Dev Console'
  1. OpenShift Dev Console
  2. ODC-6522

Create a new telemetry-plugin with segment and console TelemetryListener

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Critical Critical
    • openshift-4.11
    • None
    • UI
    • None
    • 5
    • False
    • None
    • False
    • 0
    • Not Supported
    • ODC Sprint 219

      Acceptance Criteria

      1. The telemetry options will be passed as a new SERVER_FLAGS "telemetry" property. Expect that it is not defined.
        telemetry?: Record<string, string>
        
      2. Create a new repo telemetry-plugin in our openshift/console
        1. Add a segment TelemetryListener (extension) based on the previous work from Christian (see first comment below)
          1. https://github.com/christianvogt/console-telemetry-plugin (outdated)
          2. https://github.com/christianvogt/dev-sandbox-console-plugin
          3. https://github.com/spadgett/console-plugin-template
          4. Use the segmentKey from SERVER_FLAGS and return from the listener callback as early as possible if no segmentKey is defined.
            const segmentKey = window.SERVER_FLAGS.telemetry?.SEGMENT_API_KEY;
            
        2. Add a console TelemetryListener to test/debug the telemetry events.
          1. Only log with console.debug when a SERVER_FLAGS requests this
            const enabled = !!window.SERVER_FLAGS.telemetry?.CONSOLE_LOG;
            // If possible we can also check the value if we want log with console.debug or console.info ??
            
        3. Register both listeners in a console-extensions.json
      3. Log also a cluster type in useTelemetry if it is provided. It will be set to "OSD" in our case.
        const consoleVersion = window.SERVER_FLAGS.consoleVersion;
        const clusterType = window.SERVER_FLAGS.telemetry?.CLUSTER_TYPE;
        
      4. Segment code (JS) must not be loaded when the API key is not defined.
      5. Unit tests for the extensions and useTelemetry

      Additional Details:

      1. More information about the integration with the backend could be found in the Telemetry on OSD clusters Google Doc

              divgupta Divyanshi Gupta
              divgupta Divyanshi Gupta
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: