Skip to content

Add ability to send metrics via sentry-cli #2001

Closed

Description

@AbhiPrasad

Using sentry-cli is a nice way to send metrics in bash scripts and similar.

We already have support for sending events, so this seems like a nice fit.

Ideal API:

sentry-cli send-metric gauge -n cpu_usage -v 34 -t os:MacOS -u percent

send-metric: Command to send metric. Requires argument of increment, distribution, set, or gauge (matches with our sdk public API).

Options:
-n: Name of metric (required)
-v: Metric value (required)
-u: unit (optional)
-t: tag (optional, can provide multiple)

maybe we can also somehow capture code location?

--

Since these needs have evolved over the last couple of weeks, please also make sure to implement:

The most recent state of current Metrics features can be found in [this doc], please check it once you plan to start the implementation of this issue, to see if there is anything else that needs to be implemented. (https://docs.google.com/spreadsheets/d/14cjYBAWI6RkDilqXYAsLYa89wIWdQJq350fjwqT1uyI/edit#gid=0)

Activity

  1. szokeasaurusrex commented on Apr 12, 2024

    @szokeasaurusrex
    Member

    @jan-auer Is metrics rate limiting going to be relevant for the CLI, given that each send-metrics call will originate from a separate CLI call with the proposed API? If so, I think we will need to implement this change by somehow saving the backoff information in a temp file

  2. self-assigned this
    on Apr 15, 2024
  3. elramen commented on Apr 15, 2024

    @elramen
    Member

    After discussing with @szokeasaurusrex, code location will not be implemented (at least not for the initial iteration).

  4. added a commit that references this issue on Apr 29, 2024
    5a72389
  5. github-actions commented on May 7, 2024

    @github-actions
    Contributor

    This issue has gone three weeks without activity. In another week, I will close it.

    But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


    "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

  6. added 16 commits that reference this issue on May 14, 2024
    82610c8
    b40f9ce
    1a39b52
    61ada35
    26ee405
    d7b0ba8
    76c5cbc
    b19bcb9
    4815045
    7bf8519
    7cafaaf
    d205688
    f1021de
    1539699
    a6f5ce8
    230c19c
  7. added a commit that references this issue on May 27, 2024
    c805e5c
  8. AbhiPrasad commented on May 27, 2024

    @AbhiPrasad
    ContributorAuthor

    Nice work @elramen! Looking forward to this 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions