Skip to content

feat(metrics): Add send-metric command#2063

Merged
elramen merged 4 commits intomasterfrom
elias-send-metric
May 27, 2024
Merged

feat(metrics): Add send-metric command#2063
elramen merged 4 commits intomasterfrom
elias-send-metric

Conversation

@elramen
Copy link
Copy Markdown
Member

@elramen elramen commented May 14, 2024

Add CLI command send-metric for emitting metrics to Sentry.
Add new command-parser that uses clap's Derive API. Future commands should use this as the Derive API makes it:
-Easier to read, write, and modify arguments and commands.
-Easier to keep the argument declaration and reading of argument in sync.
-Easier to reuse shared arguments.

Fixes GH-2001

@elramen elramen requested a review from szokeasaurusrex May 14, 2024 14:20
@elramen elramen force-pushed the elias-send-metric branch 2 times, most recently from b40f9ce to 1a39b52 Compare May 14, 2024 14:27
@elramen elramen requested a review from iambriccardo May 14, 2024 14:30
@elramen elramen force-pushed the elias-send-metric branch from 1a39b52 to 61ada35 Compare May 14, 2024 15:51
Copy link
Copy Markdown
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have only reviewed some of the files. Will continue reviewing the rest later

@elramen elramen force-pushed the elias-send-metric branch 2 times, most recently from 26ee405 to d7b0ba8 Compare May 15, 2024 12:27
@szokeasaurusrex
Copy link
Copy Markdown
Member

szokeasaurusrex commented May 15, 2024

Please also remember to rename this PR to "feat(metrics): ..."

@elramen elramen changed the title feat(commands): add send-metric command feat(metrics): add send-metric command May 15, 2024
@elramen elramen force-pushed the elias-send-metric branch from d7b0ba8 to 76c5cbc Compare May 15, 2024 15:01
@elramen elramen requested a review from szokeasaurusrex May 15, 2024 15:01
@elramen elramen force-pushed the elias-send-metric branch 2 times, most recently from b19bcb9 to 4815045 Compare May 15, 2024 19:11
Copy link
Copy Markdown
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another partial review – I think I checked everything besides the integration tests. Mostly small changes/nitpicks, but I did find a bug related to string indexing which will need to be fixed

@elramen elramen requested a review from sl0thentr0py May 16, 2024 13:04
@elramen elramen force-pushed the elias-send-metric branch 2 times, most recently from 7bf8519 to 7cafaaf Compare May 16, 2024 14:30
@elramen elramen requested a review from szokeasaurusrex May 16, 2024 14:39
Copy link
Copy Markdown
Contributor

@iambriccardo iambriccardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I will leave the approval to Daniel since I don't have all the CLI context I would need to properly review this PR.

@elramen elramen force-pushed the elias-send-metric branch from 7cafaaf to d205688 Compare May 16, 2024 15:37
Copy link
Copy Markdown
Member

@szokeasaurusrex szokeasaurusrex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some comments, and requested some changes, primarily related to adding clearer user-facing documentation. This time, I looked through all the files (including integration tests) – some of the changes I requested are in the files changed for the integration tests.

Overall, this PR seems to be coming together really well, and the code looks overall very good!

@elramen elramen force-pushed the elias-send-metric branch 4 times, most recently from 006ead9 to a716176 Compare May 27, 2024 15:43
@elramen elramen force-pushed the elias-send-metric branch from a716176 to 319733e Compare May 27, 2024 16:17
Copy link
Copy Markdown
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a couple of comments, rest looks good

@elramen elramen force-pushed the elias-send-metric branch from a4b1867 to 74a1aa7 Compare May 27, 2024 18:31
@elramen elramen changed the title feat(metrics): add send-metric command feat(metrics): Add send-metric command May 27, 2024
@elramen elramen merged commit c805e5c into master May 27, 2024
@elramen elramen deleted the elias-send-metric branch May 27, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to send metrics via sentry-cli

4 participants