grafana / faro-web-sdk

The Grafana Faro Web SDK, part of the Grafana Faro project, is a highly configurable web SDK for real user monitoring (RUM) that instruments browser frontend applications to capture observability signals. Frontend telemetry can then be correlated with backend and infrastructure data for full-stack observability.
https://grafana.com/oss/faro/
Apache License 2.0
739 stars 64 forks source link

Research: Provide Faro schema to reduce the risk of breaking protocol changes #534

Open codecapitano opened 6 months ago

codecapitano commented 6 months ago

Why

Changes to the Faro protocol such as conventions, structure or attributes will be breaking. To mitigate the risk, we can provide a schema which contains information about how to translate between different schema versions and provide compatibility. This allows to decouple the producer and consumer even more.

What

  1. By default Faro adds the sdk version in the meta. Since we update all package to the same version, we may use this property.
    • This assumes that the sdk prop and the respective meta never changes.
    • We can add a schema URL to the metas, but this adds unnecessary bits to each payload sent (url may be a lengthy string)
    • So we can also start by defining the sdk meta as protected?
  2. Provide a config file, similar to otel schema files, which describes changes and upgrade instructions for different schema versions.

    • Add functionality to Faro receiver and Grafana Agent to understand and update different schema versions.

    Links