Module: GitlabInternalEventsCli::Text::FlowAdvisor

Extended by:
Helpers::Formatting
Included in:
Flows::FlowAdvisor
Defined in:
lib/gitlab_internal_events_cli/text/flow_advisor.rb

Constant Summary collapse

ALTERNATE_RESOURCES_NOTICE =
<<~TEXT.freeze
  Other resources:

  #{format_warning('Tracking GitLab feature usage from database info:')}
      https://docs.gitlab.com/ee/development/internal_analytics/metrics/metrics_instrumentation.html#database-metrics

  #{format_warning('Migrating existing metrics to use Internal Events:')}
      https://docs.gitlab.com/ee/development/internal_analytics/internal_event_instrumentation/migration.html

  #{format_warning('Remove an existing metric:')}
      https://docs.gitlab.com/ee/development/internal_analytics/metrics/metrics_lifecycle.html

  #{format_warning('Finding existing usage data for GitLab features:')}
      https://metrics.gitlab.com/ (Customize Table > Snowflake query)
      https://10az.online.tableau.com/#/site/gitlab/views/SnowplowEventExplorationLast30Days/SnowplowEventExplorationLast30D
      https://10az.online.tableau.com/#/site/gitlab/views/PDServicePingExplorationDashboard/MetricsExploration

  #{format_warning('Customer wants usage data for their own GitLab instance:')}
      https://docs.gitlab.com/ee/user/analytics/

  #{format_warning('Customer wants usage data for their own products:')}
      https://docs.gitlab.com/development/internal_analytics/product_analytics/
TEXT
EVENT_TRACKING_EXAMPLES =
<<~TEXT
  Product usage can be tracked in several ways.

  By tracking events:     ex) a user changes the assignee on an issue
                          ex) a user uploads a CI template
                          ex) a service desk request is received
                          ex) all stale runners are cleaned up
                          ex) a user copies code to the clipboard from markdown
                          ex) a user uploads an issue template OR a user uploads an MR template

  From database data:     ex) track whether each gitlab instance allows signups
                          ex) query how many projects are on each gitlab instance

TEXT
DATABASE_METRIC_EXAMPLES =
<<~TEXT
  Database metrics derive their value from an ActiveRecord relation.

  Common shapes:
      count           -- ex) total number of merge requests
      distinct_count  -- ex) count of distinct users who created a project
      sum             -- ex) total storage used across all projects
      average         -- ex) average issue weight

  See https://docs.gitlab.com/development/internal_analytics/metrics/metrics_instrumentation/#database-metrics

TEXT
EVENT_EXISTENCE_CHECK_INSTRUCTIONS =
<<~TEXT.freeze
  To determine what to do next, let's figure out if the event is already tracked & usable.

  If you're unsure whether an event exists, you can check the existing defintions.

    #{format_info('FROM GDK')}: Check `config/events/` or `ee/config/events`
    #{format_info('FROM BROWSER')}: Check https://metrics.gitlab.com/snowplow

    Find one? Create a new metric for the event.
    Otherwise? Create a new event.

  If you find a relevant event that does not have the property `internal_events: true`, it can be migrated to
  Internal Events. See https://docs.gitlab.com/ee/development/internal_analytics/internal_event_instrumentation/migration.html

TEXT

Constants included from Helpers::Formatting

Helpers::Formatting::DEFAULT_WINDOW_HEIGHT, Helpers::Formatting::DEFAULT_WINDOW_WIDTH

Method Summary

Methods included from Helpers::Formatting

clear_format, counter, divider, format_error, format_heading, format_help, format_info, format_prefix, format_prompt, format_selection, format_subheader, format_warning, progress_bar