-
Story
-
Resolution: Done
-
Critical
-
None
-
None
Acceptance Criteria
- The telemetry options will be passed as a new SERVER_FLAGS "telemetry" property. Expect that it is not defined.
telemetry?: Record<string, string>
- Create a new repo telemetry-plugin in our openshift/console
- Add a segment TelemetryListener (extension) based on the previous work from Christian (see first comment below)
- https://github.com/christianvogt/console-telemetry-plugin (outdated)
- https://github.com/christianvogt/dev-sandbox-console-plugin
- https://github.com/spadgett/console-plugin-template
- 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;
- Add a console TelemetryListener to test/debug the telemetry events.
- 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 ??
- Only log with console.debug when a SERVER_FLAGS requests this
- Register both listeners in a console-extensions.json
- Add a segment TelemetryListener (extension) based on the previous work from Christian (see first comment below)
- 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;
- Segment code (JS) must not be loaded when the API key is not defined.
- Unit tests for the extensions and useTelemetry
Additional Details:
- More information about the integration with the backend could be found in the Telemetry on OSD clusters Google Doc
- is blocked by
-
ODC-6521 [Spike]Explore how to enable and use console-telemetry-plugin
- Closed
- links to