sentry-cli 2.31.2__tar.gz → 2.32.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/Cargo.lock +97 -27
  2. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/Cargo.toml +4 -2
  3. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/PKG-INFO +1 -1
  4. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/sentry_cli.egg-info/PKG-INFO +1 -1
  5. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/sentry_cli.egg-info/SOURCES.txt +10 -0
  6. sentry_cli-2.32.0/src/api/envelopes_api.rs +39 -0
  7. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/api/errors/api_error.rs +6 -0
  8. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/api/mod.rs +7 -0
  9. sentry_cli-2.32.0/src/commands/derive_parser.rs +36 -0
  10. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/mod.rs +3 -0
  11. sentry_cli-2.32.0/src/commands/send_metric/common_args.rs +67 -0
  12. sentry_cli-2.32.0/src/commands/send_metric/distribution.rs +15 -0
  13. sentry_cli-2.32.0/src/commands/send_metric/gauge.rs +15 -0
  14. sentry_cli-2.32.0/src/commands/send_metric/increment.rs +26 -0
  15. sentry_cli-2.32.0/src/commands/send_metric/mod.rs +57 -0
  16. sentry_cli-2.32.0/src/commands/send_metric/set.rs +29 -0
  17. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/config.rs +8 -5
  18. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/constants.rs +3 -0
  19. sentry_cli-2.32.0/src/utils/metrics.rs +29 -0
  20. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/mod.rs +2 -0
  21. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/releases.rs +15 -1
  22. sentry_cli-2.32.0/src/utils/value_parsers.rs +8 -0
  23. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/LICENSE +0 -0
  24. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/MANIFEST.in +0 -0
  25. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/README.md +0 -0
  26. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/build.rs +0 -0
  27. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/pyproject.toml +0 -0
  28. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/sentry_cli.egg-info/dependency_links.txt +0 -0
  29. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/sentry_cli.egg-info/top_level.txt +0 -0
  30. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/setup.cfg +0 -0
  31. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/setup.py +0 -0
  32. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/api/connection_manager.rs +0 -0
  33. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/api/encoding.rs +0 -0
  34. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/api/errors/mod.rs +0 -0
  35. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/api/errors/sentry_error.rs +0 -0
  36. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/api/pagination.rs +0 -0
  37. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/bashsupport.sh +0 -0
  38. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/bash_hook.rs +0 -0
  39. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/debug_files/bundle_jvm.rs +0 -0
  40. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/debug_files/bundle_sources.rs +0 -0
  41. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/debug_files/check.rs +0 -0
  42. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/debug_files/find.rs +0 -0
  43. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/debug_files/mod.rs +0 -0
  44. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/debug_files/print_sources.rs +0 -0
  45. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/debug_files/upload.rs +0 -0
  46. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/deploys/list.rs +0 -0
  47. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/deploys/mod.rs +0 -0
  48. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/deploys/new.rs +0 -0
  49. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/events/list.rs +0 -0
  50. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/events/mod.rs +0 -0
  51. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/files/delete.rs +0 -0
  52. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/files/list.rs +0 -0
  53. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/files/mod.rs +0 -0
  54. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/files/upload.rs +0 -0
  55. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/info.rs +0 -0
  56. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/issues/list.rs +0 -0
  57. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/issues/mod.rs +0 -0
  58. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/issues/mute.rs +0 -0
  59. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/issues/resolve.rs +0 -0
  60. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/issues/unresolve.rs +0 -0
  61. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/login.rs +0 -0
  62. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/monitors/list.rs +0 -0
  63. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/monitors/mod.rs +0 -0
  64. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/monitors/run.rs +0 -0
  65. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/organizations/list.rs +0 -0
  66. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/organizations/mod.rs +0 -0
  67. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/projects/list.rs +0 -0
  68. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/projects/mod.rs +0 -0
  69. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/react_native/appcenter.rs +0 -0
  70. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/react_native/gradle.rs +0 -0
  71. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/react_native/mod.rs +0 -0
  72. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/react_native/xcode.rs +0 -0
  73. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/releases/archive.rs +0 -0
  74. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/releases/delete.rs +0 -0
  75. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/releases/finalize.rs +0 -0
  76. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/releases/info.rs +0 -0
  77. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/releases/list.rs +0 -0
  78. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/releases/mod.rs +0 -0
  79. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/releases/new.rs +0 -0
  80. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/releases/propose_version.rs +0 -0
  81. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/releases/restore.rs +0 -0
  82. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/releases/set_commits.rs +0 -0
  83. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/repos/list.rs +0 -0
  84. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/repos/mod.rs +0 -0
  85. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/send_envelope.rs +0 -0
  86. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/send_event.rs +0 -0
  87. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/sourcemaps/explain.rs +0 -0
  88. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/sourcemaps/inject.rs +0 -0
  89. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/sourcemaps/mod.rs +0 -0
  90. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/sourcemaps/resolve.rs +0 -0
  91. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/sourcemaps/upload.rs +0 -0
  92. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/uninstall.rs +0 -0
  93. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/update.rs +0 -0
  94. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/upload_dif.rs +0 -0
  95. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/upload_dsym.rs +0 -0
  96. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/commands/upload_proguard.rs +0 -0
  97. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/main.rs +0 -0
  98. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/android.rs +0 -0
  99. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/appcenter.rs +0 -0
  100. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/args.rs +0 -0
  101. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/auth_token/auth_token_impl.rs +0 -0
  102. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/auth_token/error.rs +0 -0
  103. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/auth_token/mod.rs +0 -0
  104. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/auth_token/org_auth_token.rs +0 -0
  105. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/auth_token/test.rs +0 -0
  106. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/auth_token/user_auth_token.rs +0 -0
  107. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/chunks.rs +0 -0
  108. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/cordova.rs +0 -0
  109. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/dif.rs +0 -0
  110. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/dif_upload.rs +0 -0
  111. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/event.rs +0 -0
  112. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/file_search.rs +0 -0
  113. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/file_upload.rs +0 -0
  114. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/formatting.rs +0 -0
  115. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/fs.rs +0 -0
  116. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/http.rs +0 -0
  117. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/logging.rs +0 -0
  118. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/progress.rs +0 -0
  119. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/retry.rs +0 -0
  120. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_default_twenty.snap +0 -0
  121. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_ignore_missing.snap +0 -0
  122. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_base.snap +0 -0
  123. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_previous_commit.snap +0 -0
  124. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/snapshots/sentry_cli__utils__vcs__get_commits_from_git.snap +0 -0
  125. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/sourcemaps/inject.rs +0 -0
  126. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/sourcemaps.rs +0 -0
  127. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/system.rs +0 -0
  128. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/ui.rs +0 -0
  129. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/update.rs +0 -0
  130. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/vcs.rs +0 -0
  131. {sentry_cli-2.31.2 → sentry_cli-2.32.0}/src/utils/xcode.rs +0 -0
@@ -356,7 +356,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
356
356
  checksum = "ec0b0588d44d4d63a87dbd75c136c166bbfd9a86a31cb89e09906521c7d3f5e3"
357
357
  dependencies = [
358
358
  "bitflags 1.3.2",
359
+ "clap_derive",
359
360
  "clap_lex",
361
+ "once_cell",
360
362
  "strsim",
361
363
  "terminal_size",
362
364
  ]
@@ -370,6 +372,19 @@ dependencies = [
370
372
  "clap",
371
373
  ]
372
374
 
375
+ [[package]]
376
+ name = "clap_derive"
377
+ version = "4.1.0"
378
+ source = "registry+https://github.com/rust-lang/crates.io-index"
379
+ checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8"
380
+ dependencies = [
381
+ "heck",
382
+ "proc-macro-error",
383
+ "proc-macro2",
384
+ "quote",
385
+ "syn 1.0.107",
386
+ ]
387
+
373
388
  [[package]]
374
389
  name = "clap_lex"
375
390
  version = "0.3.1"
@@ -462,9 +477,9 @@ dependencies = [
462
477
 
463
478
  [[package]]
464
479
  name = "crc32fast"
465
- version = "1.3.2"
480
+ version = "1.4.0"
466
481
  source = "registry+https://github.com/rust-lang/crates.io-index"
467
- checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
482
+ checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa"
468
483
  dependencies = [
469
484
  "cfg-if",
470
485
  ]
@@ -1086,6 +1101,12 @@ version = "0.14.0"
1086
1101
  source = "registry+https://github.com/rust-lang/crates.io-index"
1087
1102
  checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
1088
1103
 
1104
+ [[package]]
1105
+ name = "heck"
1106
+ version = "0.4.1"
1107
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1108
+ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
1109
+
1089
1110
  [[package]]
1090
1111
  name = "hermit-abi"
1091
1112
  version = "0.1.19"
@@ -1121,13 +1142,13 @@ dependencies = [
1121
1142
 
1122
1143
  [[package]]
1123
1144
  name = "hostname"
1124
- version = "0.3.1"
1145
+ version = "0.4.0"
1125
1146
  source = "registry+https://github.com/rust-lang/crates.io-index"
1126
- checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
1147
+ checksum = "f9c7c7c8ac16c798734b8a24560c1362120597c40d5e1459f09498f8f6c8f2ba"
1127
1148
  dependencies = [
1149
+ "cfg-if",
1128
1150
  "libc",
1129
- "match_cfg",
1130
- "winapi 0.3.9",
1151
+ "windows",
1131
1152
  ]
1132
1153
 
1133
1154
  [[package]]
@@ -1318,6 +1339,15 @@ dependencies = [
1318
1339
  "either",
1319
1340
  ]
1320
1341
 
1342
+ [[package]]
1343
+ name = "itertools"
1344
+ version = "0.13.0"
1345
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1346
+ checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
1347
+ dependencies = [
1348
+ "either",
1349
+ ]
1350
+
1321
1351
  [[package]]
1322
1352
  name = "itoa"
1323
1353
  version = "0.4.8"
@@ -1484,12 +1514,6 @@ dependencies = [
1484
1514
  "vlq",
1485
1515
  ]
1486
1516
 
1487
- [[package]]
1488
- name = "match_cfg"
1489
- version = "0.1.0"
1490
- source = "registry+https://github.com/rust-lang/crates.io-index"
1491
- checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
1492
-
1493
1517
  [[package]]
1494
1518
  name = "maybe-owned"
1495
1519
  version = "0.3.4"
@@ -1981,7 +2005,7 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd"
1981
2005
  dependencies = [
1982
2006
  "difflib",
1983
2007
  "float-cmp",
1984
- "itertools",
2008
+ "itertools 0.10.5",
1985
2009
  "normalize-line-endings",
1986
2010
  "predicates-core",
1987
2011
  "regex",
@@ -2007,6 +2031,30 @@ dependencies = [
2007
2031
  "unicode-width",
2008
2032
  ]
2009
2033
 
2034
+ [[package]]
2035
+ name = "proc-macro-error"
2036
+ version = "1.0.4"
2037
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2038
+ checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
2039
+ dependencies = [
2040
+ "proc-macro-error-attr",
2041
+ "proc-macro2",
2042
+ "quote",
2043
+ "syn 1.0.107",
2044
+ "version_check",
2045
+ ]
2046
+
2047
+ [[package]]
2048
+ name = "proc-macro-error-attr"
2049
+ version = "1.0.4"
2050
+ source = "registry+https://github.com/rust-lang/crates.io-index"
2051
+ checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
2052
+ dependencies = [
2053
+ "proc-macro2",
2054
+ "quote",
2055
+ "version_check",
2056
+ ]
2057
+
2010
2058
  [[package]]
2011
2059
  name = "proc-macro2"
2012
2060
  version = "1.0.66"
@@ -2396,9 +2444,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
2396
2444
 
2397
2445
  [[package]]
2398
2446
  name = "sentry"
2399
- version = "0.32.2"
2447
+ version = "0.33.0"
2400
2448
  source = "registry+https://github.com/rust-lang/crates.io-index"
2401
- checksum = "766448f12e44d68e675d5789a261515c46ac6ccd240abdd451a9c46c84a49523"
2449
+ checksum = "3b73ab9d5b35ed718611e89db8c886647821cfce79723b9e2e4e7cb3fd9cdd49"
2402
2450
  dependencies = [
2403
2451
  "curl",
2404
2452
  "httpdate",
@@ -2409,9 +2457,9 @@ dependencies = [
2409
2457
 
2410
2458
  [[package]]
2411
2459
  name = "sentry-anyhow"
2412
- version = "0.32.2"
2460
+ version = "0.33.0"
2413
2461
  source = "registry+https://github.com/rust-lang/crates.io-index"
2414
- checksum = "4da4015667c99f88d68ca7ff02b90c762d6154a4ceb7c02922b9a1dbd3959eeb"
2462
+ checksum = "3c7825549eb646ef0224b0b7fc6d38faa459d7e5e1f902a4c12bbd8de4ad060f"
2415
2463
  dependencies = [
2416
2464
  "anyhow",
2417
2465
  "sentry-backtrace",
@@ -2420,9 +2468,9 @@ dependencies = [
2420
2468
 
2421
2469
  [[package]]
2422
2470
  name = "sentry-backtrace"
2423
- version = "0.32.2"
2471
+ version = "0.33.0"
2424
2472
  source = "registry+https://github.com/rust-lang/crates.io-index"
2425
- checksum = "32701cad8b3c78101e1cd33039303154791b0ff22e7802ed8cc23212ef478b45"
2473
+ checksum = "8ce52a2633e0332821389f865762b94852e71b359cd8e95cbf91f38c154302cb"
2426
2474
  dependencies = [
2427
2475
  "backtrace",
2428
2476
  "once_cell",
@@ -2432,7 +2480,7 @@ dependencies = [
2432
2480
 
2433
2481
  [[package]]
2434
2482
  name = "sentry-cli"
2435
- version = "2.31.2"
2483
+ version = "2.32.0"
2436
2484
  dependencies = [
2437
2485
  "anyhow",
2438
2486
  "anylog",
@@ -2460,7 +2508,7 @@ dependencies = [
2460
2508
  "ignore",
2461
2509
  "indicatif",
2462
2510
  "insta",
2463
- "itertools",
2511
+ "itertools 0.10.5",
2464
2512
  "java-properties",
2465
2513
  "lazy_static",
2466
2514
  "libc",
@@ -2508,9 +2556,9 @@ dependencies = [
2508
2556
 
2509
2557
  [[package]]
2510
2558
  name = "sentry-contexts"
2511
- version = "0.32.2"
2559
+ version = "0.33.0"
2512
2560
  source = "registry+https://github.com/rust-lang/crates.io-index"
2513
- checksum = "17ddd2a91a13805bd8dab4ebf47323426f758c35f7bf24eacc1aded9668f3824"
2561
+ checksum = "10565e6eb013737bf7555250f8b4b8248a571e1de4de7230037f5dd5ea51bc63"
2514
2562
  dependencies = [
2515
2563
  "hostname",
2516
2564
  "libc",
@@ -2522,12 +2570,15 @@ dependencies = [
2522
2570
 
2523
2571
  [[package]]
2524
2572
  name = "sentry-core"
2525
- version = "0.32.2"
2573
+ version = "0.33.0"
2526
2574
  source = "registry+https://github.com/rust-lang/crates.io-index"
2527
- checksum = "b1189f68d7e7e102ef7171adf75f83a59607fafd1a5eecc9dc06c026ff3bdec4"
2575
+ checksum = "a2c5e7a0430cfa86b7cb6e7bc01a56331937b2ba08ab703c2e7331139a99f121"
2528
2576
  dependencies = [
2577
+ "crc32fast",
2578
+ "itertools 0.13.0",
2529
2579
  "once_cell",
2530
2580
  "rand",
2581
+ "regex",
2531
2582
  "sentry-types",
2532
2583
  "serde",
2533
2584
  "serde_json",
@@ -2535,9 +2586,9 @@ dependencies = [
2535
2586
 
2536
2587
  [[package]]
2537
2588
  name = "sentry-types"
2538
- version = "0.32.2"
2589
+ version = "0.33.0"
2539
2590
  source = "registry+https://github.com/rust-lang/crates.io-index"
2540
- checksum = "c7173fd594569091f68a7c37a886e202f4d0c1db1e1fa1d18a051ba695b2e2ec"
2591
+ checksum = "10d5ad9e33b9f6f598387a6a23aa23c7f13e4e7740a34cd4d9c8db851bfdae05"
2541
2592
  dependencies = [
2542
2593
  "debugid",
2543
2594
  "hex",
@@ -3355,6 +3406,25 @@ version = "0.4.0"
3355
3406
  source = "registry+https://github.com/rust-lang/crates.io-index"
3356
3407
  checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
3357
3408
 
3409
+ [[package]]
3410
+ name = "windows"
3411
+ version = "0.52.0"
3412
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3413
+ checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be"
3414
+ dependencies = [
3415
+ "windows-core",
3416
+ "windows-targets 0.52.0",
3417
+ ]
3418
+
3419
+ [[package]]
3420
+ name = "windows-core"
3421
+ version = "0.52.0"
3422
+ source = "registry+https://github.com/rust-lang/crates.io-index"
3423
+ checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
3424
+ dependencies = [
3425
+ "windows-targets 0.52.0",
3426
+ ]
3427
+
3358
3428
  [[package]]
3359
3429
  name = "windows-sys"
3360
3430
  version = "0.42.0"
@@ -2,7 +2,7 @@
2
2
  authors = ["Armin Ronacher <armin.ronacher@active-4.com>"]
3
3
  build = "build.rs"
4
4
  name = "sentry-cli"
5
- version = "2.31.2"
5
+ version = "2.32.0"
6
6
  edition = "2021"
7
7
  rust-version = "1.65"
8
8
 
@@ -16,6 +16,7 @@ bytecount = "0.6.3"
16
16
  chardet = "0.2.4"
17
17
  chrono = { version = "0.4.31", features = ["serde"] }
18
18
  clap = { version = "4.1.6", default-features = false, features = [
19
+ "derive",
19
20
  "std",
20
21
  "suggestions",
21
22
  "wrap_help",
@@ -58,10 +59,11 @@ regex = "1.7.3"
58
59
  runas = "1.0.0"
59
60
  rust-ini = "0.18.0"
60
61
  semver = "1.0.16"
61
- sentry = { version = "0.32.2", default-features = false, features = [
62
+ sentry = { version = "0.33.0", default-features = false, features = [
62
63
  "anyhow",
63
64
  "curl",
64
65
  "contexts",
66
+ "UNSTABLE_metrics",
65
67
  ] }
66
68
  serde = { version = "1.0.152", features = ["derive"] }
67
69
  serde_json = "1.0.93"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sentry_cli
3
- Version: 2.31.2
3
+ Version: 2.32.0
4
4
  Summary: A command line utility to work with Sentry.
5
5
  Home-page: https://github.com/getsentry/sentry-cli
6
6
  Author: Sentry
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sentry_cli
3
- Version: 2.31.2
3
+ Version: 2.32.0
4
4
  Summary: A command line utility to work with Sentry.
5
5
  Home-page: https://github.com/getsentry/sentry-cli
6
6
  Author: Sentry
@@ -17,12 +17,14 @@ src/constants.rs
17
17
  src/main.rs
18
18
  src/api/connection_manager.rs
19
19
  src/api/encoding.rs
20
+ src/api/envelopes_api.rs
20
21
  src/api/mod.rs
21
22
  src/api/pagination.rs
22
23
  src/api/errors/api_error.rs
23
24
  src/api/errors/mod.rs
24
25
  src/api/errors/sentry_error.rs
25
26
  src/commands/bash_hook.rs
27
+ src/commands/derive_parser.rs
26
28
  src/commands/info.rs
27
29
  src/commands/login.rs
28
30
  src/commands/mod.rs
@@ -77,6 +79,12 @@ src/commands/releases/restore.rs
77
79
  src/commands/releases/set_commits.rs
78
80
  src/commands/repos/list.rs
79
81
  src/commands/repos/mod.rs
82
+ src/commands/send_metric/common_args.rs
83
+ src/commands/send_metric/distribution.rs
84
+ src/commands/send_metric/gauge.rs
85
+ src/commands/send_metric/increment.rs
86
+ src/commands/send_metric/mod.rs
87
+ src/commands/send_metric/set.rs
80
88
  src/commands/sourcemaps/explain.rs
81
89
  src/commands/sourcemaps/inject.rs
82
90
  src/commands/sourcemaps/mod.rs
@@ -96,6 +104,7 @@ src/utils/formatting.rs
96
104
  src/utils/fs.rs
97
105
  src/utils/http.rs
98
106
  src/utils/logging.rs
107
+ src/utils/metrics.rs
99
108
  src/utils/mod.rs
100
109
  src/utils/progress.rs
101
110
  src/utils/releases.rs
@@ -104,6 +113,7 @@ src/utils/sourcemaps.rs
104
113
  src/utils/system.rs
105
114
  src/utils/ui.rs
106
115
  src/utils/update.rs
116
+ src/utils/value_parsers.rs
107
117
  src/utils/vcs.rs
108
118
  src/utils/xcode.rs
109
119
  src/utils/auth_token/auth_token_impl.rs
@@ -0,0 +1,39 @@
1
+ use super::{
2
+ errors::{ApiErrorKind, ApiResult},
3
+ Api, ApiResponse, Method,
4
+ };
5
+ use crate::{api::errors::ApiError, constants::USER_AGENT};
6
+ use log::debug;
7
+ use sentry::{types::Dsn, Envelope};
8
+ use std::sync::Arc;
9
+
10
+ pub struct EnvelopesApi {
11
+ api: Arc<Api>,
12
+ dsn: Dsn,
13
+ }
14
+
15
+ impl EnvelopesApi {
16
+ pub fn try_new() -> ApiResult<EnvelopesApi> {
17
+ let api = Api::current();
18
+ api.config
19
+ .get_dsn()
20
+ .map(|dsn| EnvelopesApi { api, dsn })
21
+ .map_err(|_| ApiErrorKind::DsnMissing.into())
22
+ }
23
+
24
+ pub fn send_envelope(&self, envelope: Envelope) -> ApiResult<ApiResponse> {
25
+ let mut body = vec![];
26
+ envelope
27
+ .to_writer(&mut body)
28
+ .map_err(|e| ApiError::with_source(ApiErrorKind::CannotSerializeEnvelope, e))?;
29
+ let url = self.dsn.envelope_api_url();
30
+ let auth = self.dsn.to_auth(Some(USER_AGENT));
31
+ debug!("Sending envelope:\n{}", String::from_utf8_lossy(&body));
32
+ self.api
33
+ .request(Method::Post, url.as_str(), None)?
34
+ .with_header("X-Sentry-Auth", &auth.to_string())?
35
+ .with_body(body)?
36
+ .send()?
37
+ .into_result()
38
+ }
39
+ }
@@ -12,6 +12,8 @@ pub struct ApiError {
12
12
  pub(in crate::api) enum ApiErrorKind {
13
13
  #[error("could not serialize value as JSON")]
14
14
  CannotSerializeAsJson,
15
+ #[error("could not serialize envelope")]
16
+ CannotSerializeEnvelope,
15
17
  #[error("could not parse JSON response")]
16
18
  BadJson,
17
19
  #[error("not a JSON response")]
@@ -38,6 +40,10 @@ pub(in crate::api) enum ApiErrorKind {
38
40
  "Auth token is required for this request. Please run `sentry-cli login` and try again!"
39
41
  )]
40
42
  AuthMissing,
43
+ #[error(
44
+ "DSN missing. Please set the `SENTRY_DSN` environment variable to your project's DSN."
45
+ )]
46
+ DsnMissing,
41
47
  }
42
48
 
43
49
  impl fmt::Display for ApiError {
@@ -3,6 +3,8 @@
3
3
  //! to the GitHub API to figure out if there are new releases of the
4
4
  //! sentry-cli tool.
5
5
 
6
+ pub mod envelopes_api;
7
+
6
8
  mod connection_manager;
7
9
  mod encoding;
8
10
  mod errors;
@@ -1746,6 +1748,11 @@ impl ApiRequest {
1746
1748
  Ok(self)
1747
1749
  }
1748
1750
 
1751
+ pub fn with_body(mut self, body: Vec<u8>) -> ApiResult<Self> {
1752
+ self.body = Some(body);
1753
+ Ok(self)
1754
+ }
1755
+
1749
1756
  /// attaches some form data to the request.
1750
1757
  pub fn with_form_data(mut self, form: curl::easy::Form) -> ApiResult<Self> {
1751
1758
  debug!("sending form data");
@@ -0,0 +1,36 @@
1
+ use crate::utils::auth_token::AuthToken;
2
+ use crate::utils::value_parsers::kv_parser;
3
+ use clap::{command, value_parser, ArgAction::SetTrue, Parser, Subcommand};
4
+
5
+ use super::send_metric::SendMetricArgs;
6
+
7
+ #[derive(Parser)]
8
+ pub(super) struct SentryCLI {
9
+ #[command(subcommand)]
10
+ pub(super) command: SentryCLICommand,
11
+
12
+ #[arg(global=true, long="header", value_name="KEY:VALUE", value_parser=kv_parser)]
13
+ #[arg(help = "Custom headers that should be attached to all requests{n}in key:value format")]
14
+ pub(super) headers: Vec<(String, String)>,
15
+
16
+ #[arg(global=true, long, value_parser=value_parser!(AuthToken))]
17
+ #[arg(help = "Use the given Sentry auth token")]
18
+ pub(super) auth_token: Option<AuthToken>,
19
+
20
+ #[arg(global=true, ignore_case=true, value_parser=["trace", "debug", "info", "warn", "error"])]
21
+ #[arg(long, help = "Set the log output verbosity")]
22
+ pub(super) log_level: Option<String>,
23
+
24
+ #[arg(global=true, action=SetTrue, visible_alias="silent", long)]
25
+ #[arg(help = "Do not print any output while preserving correct exit code. \
26
+ This flag is currently implemented only for selected subcommands")]
27
+ pub(super) quiet: bool,
28
+
29
+ #[arg(global=true, action=SetTrue, long, hide=true, help="Always return 0 exit code")]
30
+ pub(super) allow_failure: bool,
31
+ }
32
+
33
+ #[derive(Subcommand)]
34
+ pub(super) enum SentryCLICommand {
35
+ SendMetric(SendMetricArgs),
36
+ }
@@ -18,6 +18,8 @@ use crate::utils::logging::Logger;
18
18
  use crate::utils::system::{init_backtrace, load_dotenv, print_error, QuietExit};
19
19
  use crate::utils::update::run_sentrycli_update_nagger;
20
20
 
21
+ mod derive_parser;
22
+
21
23
  macro_rules! each_subcommand {
22
24
  ($mac:ident) => {
23
25
  $mac!(bash_hook);
@@ -36,6 +38,7 @@ macro_rules! each_subcommand {
36
38
  $mac!(repos);
37
39
  $mac!(send_event);
38
40
  $mac!(send_envelope);
41
+ $mac!(send_metric);
39
42
  $mac!(sourcemaps);
40
43
  #[cfg(not(feature = "managed"))]
41
44
  $mac!(uninstall);
@@ -0,0 +1,67 @@
1
+ use crate::utils::value_parsers;
2
+ use anyhow::{anyhow, Result};
3
+ use clap::command;
4
+ use clap::Args;
5
+ use sentry::metrics::MetricStr;
6
+ use std::str::FromStr;
7
+
8
+ /// Arguments for send-metric subcommands using float as value type and no default value.
9
+ #[derive(Args)]
10
+ pub(super) struct FloatValueMetricArgs {
11
+ #[command(flatten)]
12
+ pub(super) common: CommonMetricArgs,
13
+
14
+ #[arg(short, long, help = "Metric value, any finite 64 bit float.")]
15
+ pub(super) value: f64,
16
+ }
17
+
18
+ /// Common arguments for all send-metric subcommands.
19
+ #[derive(Args)]
20
+ pub(super) struct CommonMetricArgs {
21
+ #[arg(short, long)]
22
+ #[arg(help = "The name of the metric, identifying it in Sentry.")]
23
+ pub(super) name: MetricName,
24
+
25
+ #[arg(short, long)]
26
+ #[arg(
27
+ help = "Any custom unit. You can have multiple metrics with the same name but different \
28
+ units."
29
+ )]
30
+ pub(super) unit: Option<String>,
31
+
32
+ #[arg(short, long, value_delimiter=',', value_name = "KEY:VALUE", num_args = 1..)]
33
+ #[arg(value_parser=value_parsers::kv_parser)]
34
+ #[arg(
35
+ help = "Metric tags as key:value pairs. Tags allow you to add dimensions to your metrics \
36
+ and can be filtered or grouped by in Sentry."
37
+ )]
38
+ pub(super) tags: Vec<(String, String)>,
39
+ }
40
+
41
+ #[derive(Clone)]
42
+ pub(super) struct MetricName(String);
43
+
44
+ impl FromStr for MetricName {
45
+ type Err = anyhow::Error;
46
+
47
+ /// Metric name must start with an alphabetic character.
48
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
49
+ if s.chars()
50
+ .next()
51
+ .ok_or_else(|| anyhow!("metric name cannot be empty"))?
52
+ .is_ascii_alphabetic()
53
+ {
54
+ Ok(MetricName(s.to_string()))
55
+ } else {
56
+ Err(anyhow!(
57
+ "metric name must start with an alphabetic character"
58
+ ))
59
+ }
60
+ }
61
+ }
62
+
63
+ impl From<MetricName> for MetricStr {
64
+ fn from(name: MetricName) -> MetricStr {
65
+ MetricStr::from(name.0)
66
+ }
67
+ }
@@ -0,0 +1,15 @@
1
+ use super::common_args::FloatValueMetricArgs;
2
+ use crate::{api::envelopes_api::EnvelopesApi, utils::metrics::DefaultTags};
3
+ use anyhow::Result;
4
+ use sentry::metrics::Metric;
5
+
6
+ pub(super) fn execute(args: FloatValueMetricArgs) -> Result<()> {
7
+ EnvelopesApi::try_new()?.send_envelope(
8
+ Metric::distribution(args.common.name, args.value)
9
+ .with_unit(args.common.unit)
10
+ .with_tags(args.common.tags.with_default_tags())
11
+ .finish()
12
+ .to_envelope(),
13
+ )?;
14
+ Ok(())
15
+ }
@@ -0,0 +1,15 @@
1
+ use super::common_args::FloatValueMetricArgs;
2
+ use crate::{api::envelopes_api::EnvelopesApi, utils::metrics::DefaultTags};
3
+ use anyhow::Result;
4
+ use sentry::metrics::Metric;
5
+
6
+ pub(super) fn execute(args: FloatValueMetricArgs) -> Result<()> {
7
+ EnvelopesApi::try_new()?.send_envelope(
8
+ Metric::gauge(args.common.name, args.value)
9
+ .with_unit(args.common.unit)
10
+ .with_tags(args.common.tags.with_default_tags())
11
+ .finish()
12
+ .to_envelope(),
13
+ )?;
14
+ Ok(())
15
+ }
@@ -0,0 +1,26 @@
1
+ use super::common_args::CommonMetricArgs;
2
+ use crate::{api::envelopes_api::EnvelopesApi, utils::metrics::DefaultTags};
3
+ use anyhow::Result;
4
+ use clap::{command, Args};
5
+ use sentry::metrics::Metric;
6
+
7
+ #[derive(Args)]
8
+ pub(super) struct IncrementMetricArgs {
9
+ #[command(flatten)]
10
+ common: CommonMetricArgs,
11
+
12
+ #[arg(short, long, default_value = "1")]
13
+ #[arg(help = "Value to increment the metric by, any finite 64 bit float.")]
14
+ value: f64,
15
+ }
16
+
17
+ pub(super) fn execute(args: IncrementMetricArgs) -> Result<()> {
18
+ EnvelopesApi::try_new()?.send_envelope(
19
+ Metric::incr(args.common.name, args.value)
20
+ .with_unit(args.common.unit)
21
+ .with_tags(args.common.tags.with_default_tags())
22
+ .finish()
23
+ .to_envelope(),
24
+ )?;
25
+ Ok(())
26
+ }
@@ -0,0 +1,57 @@
1
+ pub mod common_args;
2
+
3
+ mod distribution;
4
+ mod gauge;
5
+ mod increment;
6
+ mod set;
7
+
8
+ use self::common_args::FloatValueMetricArgs;
9
+ use self::increment::IncrementMetricArgs;
10
+ use self::set::SetMetricArgs;
11
+ use super::derive_parser::{SentryCLI, SentryCLICommand};
12
+ use anyhow::Result;
13
+ use clap::{command, Args, Subcommand};
14
+ use clap::{ArgMatches, Command, Parser};
15
+
16
+ #[derive(Args)]
17
+ pub(super) struct SendMetricArgs {
18
+ #[command(subcommand)]
19
+ subcommand: SendMetricSubcommand,
20
+ }
21
+
22
+ #[derive(Subcommand)]
23
+ #[command(about = "Send a metric to Sentry.")]
24
+ #[command(long_about = "Send a metric event to Sentry.{n}{n}\
25
+ This command will validate input parameters and attempt to send a metric to \
26
+ Sentry. Due to network errors and rate limits, the metric is not guaranteed to \
27
+ arrive. Check the debug output for transmission errors by passing --log-level=\
28
+ debug or setting `SENTRY_LOG_LEVEL=debug`.")]
29
+ enum SendMetricSubcommand {
30
+ #[command(about = "Increment a counter metric")]
31
+ Increment(IncrementMetricArgs),
32
+ #[command(about = "Update a distribution metric with the provided value")]
33
+ Distribution(FloatValueMetricArgs),
34
+ #[command(about = "Update a gauge metric with the provided value")]
35
+ Gauge(FloatValueMetricArgs),
36
+ #[command(about = "Update a set metric with the provided value")]
37
+ Set(SetMetricArgs),
38
+ }
39
+
40
+ pub(super) fn make_command(command: Command) -> Command {
41
+ SendMetricSubcommand::augment_subcommands(command)
42
+ }
43
+
44
+ pub(super) fn execute(_: &ArgMatches) -> Result<()> {
45
+ // When adding a new subcommand to the derive_parser SentryCLI, replace the line below with the following:
46
+ // let subcommand = match SentryCLI::parse().command {
47
+ // SentryCLICommand::SendMetric(SendMetricArgs { subcommand }) => subcommand,
48
+ // _ => panic!("expected send-metric subcommand"),
49
+ // };
50
+ let SentryCLICommand::SendMetric(SendMetricArgs { subcommand }) = SentryCLI::parse().command;
51
+ match subcommand {
52
+ SendMetricSubcommand::Increment(args) => increment::execute(args),
53
+ SendMetricSubcommand::Distribution(args) => distribution::execute(args),
54
+ SendMetricSubcommand::Gauge(args) => gauge::execute(args),
55
+ SendMetricSubcommand::Set(args) => set::execute(args),
56
+ }
57
+ }