Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schematelemetry,eventpb: add schema telemetry #84761

Merged
merged 3 commits into from
Aug 9, 2022

Commits on Aug 8, 2022

  1. schematelemetry,eventpb: add schema telemetry

    This commit adds:
      - the event definitions and logic for generating them,
      - the scheduling and jobs boilerplate to periodically log them.
    
    Care is taken to redact all strings present in descriptors which might
    unintentionally be leaking PIIs.
    
    The event generation logic is tested on the schema of a bootstrapped
    test cluster: the test checks that the events match expectations.
    
    Fixes cockroachdb#84284.
    
    Release note (general change): CRDB will now collect schema info if
    phoning home is enabled. This schema info is added to the telemetry log
    by a built-in scheduled job which runs on a weekly basis by default.
    This recurrence can be changed via the sql.schema.telemetry.recurrence
    cluster setting.  The schedule can also be paused via PAUSE SCHEDULE
    followed by its ID, which can be retrieved by querying
    SELECT * FROM [SHOW SCHEDULES] WHERE label = 'sql-schema-telemetry'.
    Marius Posta committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    262a70d View commit details
    Browse the repository at this point in the history
  2. security: move constants to certnames package

    This breaks an import dependency cycle.
    
    Release note: None
    Marius Posta committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    804f3c1 View commit details
    Browse the repository at this point in the history
  3. logpb: introduce EventPayload implementation for tests

    This new EventPayload implementation makes it possible to create
    instances of this interface in tests without needing to import the
    eventpb package. This helps break import dependency cycles.
    
    Release note: None
    Marius Posta committed Aug 8, 2022
    Configuration menu
    Copy the full SHA
    7370772 View commit details
    Browse the repository at this point in the history