Skip to content

Add ability to send metrics via sentry-cli #2001

@AbhiPrasad

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions