Skip to content
Snippets Groups Projects

cli: Add sentry related commands to extract data from events

Merged Antoine Lambert requested to merge anlambert/swh-core:sentry-cli into master
  1. Jan 24, 2025
    • Antoine Lambert's avatar
      cli: Add 'sentry extract-scheduler-tasks' command · c16bcd57
      Antoine Lambert authored
      Usage: swh sentry extract-scheduler-tasks [OPTIONS]
      
        Extract scheduler task parameters from events.
      
        This command allows to extract scheduler task parameters from Sentry events
        related to a Software Heritage scheduler task and dumps a CSV file to stdout
        that can be consumed by the CLI command:
      
        $ swh scheduler task schedule --columns type --columns kwargs <csv_file>.
      
      Options:
        -u, --sentry-url TEXT           Sentry URL  [default:
                                        https://sentry.softwareheritage.org]
        -t, --sentry-token TEXT         Bearer token required to communicate with
                                        Sentry API (can also be provided in
                                        SENTRY_TOKEN environment variable)
                                        [required]
        -i, --sentry-issue-number TEXT  Sentry issue number to extract origin URLs
                                        from its events  [required]
        -e, --environment TEXT          Filter on environment: production or
                                        staging, both are selected by default
        -h, --help                      Show this message and exit.
      Verified
      c16bcd57
    • Antoine Lambert's avatar
      cli: Add 'sentry extract-origin-urls' command · 965be8f9
      Antoine Lambert authored
      Usage: swh sentry extract-origin-urls [OPTIONS]
      
        Extract origin URLs from events.
      
        This command allows to extract origin URLs from Sentry events related to a
        Software Heritage loader and dumps them to stdout.
      
      Options:
        -u, --sentry-url TEXT           Sentry URL  [default:
                                        https://sentry.softwareheritage.org]
        -t, --sentry-token TEXT         Bearer token required to communicate with
                                        Sentry API (can also be provided in
                                        SENTRY_TOKEN environment variable)
                                        [required]
        -i, --sentry-issue-number TEXT  Sentry issue number to extract origin URLs
                                        from its events  [required]
        -e, --environment TEXT          Filter on environment: production or
                                        staging, both are selected by default
        -h, --help                      Show this message and exit.
      Verified
      965be8f9
Loading