sentry-cli 2.36.1__tar.gz → 2.36.5__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 (144) hide show
  1. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/Cargo.lock +3 -3
  2. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/Cargo.toml +1 -1
  3. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/PKG-INFO +1 -1
  4. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/sentry_cli.egg-info/PKG-INFO +1 -1
  5. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/sentry_cli.egg-info/SOURCES.txt +1 -0
  6. sentry_cli-2.36.5/src/api/data_types/deploy.rs +29 -0
  7. sentry_cli-2.36.5/src/api/data_types/mod.rs +7 -0
  8. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/mod.rs +0 -22
  9. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/deploys/new.rs +7 -5
  10. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/monitors/run.rs +10 -2
  11. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/send_metric/mod.rs +27 -7
  12. sentry_cli-2.36.1/src/api/data_types/mod.rs +0 -3
  13. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/LICENSE +0 -0
  14. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/MANIFEST.in +0 -0
  15. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/README.md +0 -0
  16. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/build.rs +0 -0
  17. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/pyproject.toml +0 -0
  18. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/sentry_cli.egg-info/dependency_links.txt +0 -0
  19. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/sentry_cli.egg-info/top_level.txt +0 -0
  20. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/setup.cfg +0 -0
  21. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/setup.py +0 -0
  22. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/connection_manager.rs +0 -0
  23. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/data_types/chunking/artifact.rs +0 -0
  24. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/data_types/chunking/compression.rs +0 -0
  25. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/data_types/chunking/dif.rs +0 -0
  26. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/data_types/chunking/file_state.rs +0 -0
  27. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/data_types/chunking/hash_algorithm.rs +0 -0
  28. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/data_types/chunking/mod.rs +0 -0
  29. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/data_types/chunking/upload/capability.rs +0 -0
  30. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/data_types/chunking/upload/mod.rs +0 -0
  31. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/data_types/chunking/upload/options.rs +0 -0
  32. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/encoding.rs +0 -0
  33. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/envelopes_api.rs +0 -0
  34. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/errors/api_error.rs +0 -0
  35. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/errors/mod.rs +0 -0
  36. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/errors/sentry_error.rs +0 -0
  37. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/api/pagination.rs +0 -0
  38. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/bashsupport.sh +0 -0
  39. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/bash_hook.rs +0 -0
  40. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/debug_files/bundle_jvm.rs +0 -0
  41. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/debug_files/bundle_sources.rs +0 -0
  42. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/debug_files/check.rs +0 -0
  43. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/debug_files/find.rs +0 -0
  44. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/debug_files/mod.rs +0 -0
  45. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/debug_files/print_sources.rs +0 -0
  46. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/debug_files/upload.rs +0 -0
  47. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/deploys/list.rs +0 -0
  48. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/deploys/mod.rs +0 -0
  49. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/derive_parser.rs +0 -0
  50. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/events/list.rs +0 -0
  51. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/events/mod.rs +0 -0
  52. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/files/delete.rs +0 -0
  53. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/files/list.rs +0 -0
  54. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/files/mod.rs +0 -0
  55. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/files/upload.rs +0 -0
  56. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/info.rs +0 -0
  57. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/issues/list.rs +0 -0
  58. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/issues/mod.rs +0 -0
  59. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/issues/mute.rs +0 -0
  60. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/issues/resolve.rs +0 -0
  61. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/issues/unresolve.rs +0 -0
  62. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/login.rs +0 -0
  63. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/mod.rs +0 -0
  64. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/monitors/list.rs +0 -0
  65. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/monitors/mod.rs +0 -0
  66. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/organizations/list.rs +0 -0
  67. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/organizations/mod.rs +0 -0
  68. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/projects/list.rs +0 -0
  69. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/projects/mod.rs +0 -0
  70. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/react_native/appcenter.rs +0 -0
  71. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/react_native/gradle.rs +0 -0
  72. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/react_native/mod.rs +0 -0
  73. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/react_native/xcode.rs +0 -0
  74. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/releases/archive.rs +0 -0
  75. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/releases/delete.rs +0 -0
  76. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/releases/finalize.rs +0 -0
  77. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/releases/info.rs +0 -0
  78. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/releases/list.rs +0 -0
  79. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/releases/mod.rs +0 -0
  80. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/releases/new.rs +0 -0
  81. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/releases/propose_version.rs +0 -0
  82. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/releases/restore.rs +0 -0
  83. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/releases/set_commits.rs +0 -0
  84. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/repos/list.rs +0 -0
  85. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/repos/mod.rs +0 -0
  86. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/send_envelope.rs +0 -0
  87. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/send_event.rs +0 -0
  88. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/send_metric/common_args.rs +0 -0
  89. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/send_metric/distribution.rs +0 -0
  90. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/send_metric/gauge.rs +0 -0
  91. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/send_metric/increment.rs +0 -0
  92. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/send_metric/set.rs +0 -0
  93. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/sourcemaps/explain.rs +0 -0
  94. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/sourcemaps/inject.rs +0 -0
  95. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/sourcemaps/mod.rs +0 -0
  96. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/sourcemaps/resolve.rs +0 -0
  97. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/sourcemaps/upload.rs +0 -0
  98. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/uninstall.rs +0 -0
  99. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/update.rs +0 -0
  100. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/upload_dif.rs +0 -0
  101. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/upload_dsym.rs +0 -0
  102. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/commands/upload_proguard.rs +0 -0
  103. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/config.rs +0 -0
  104. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/constants.rs +0 -0
  105. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/main.rs +0 -0
  106. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/android.rs +0 -0
  107. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/appcenter.rs +0 -0
  108. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/args.rs +0 -0
  109. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/auth_token/auth_token_impl.rs +0 -0
  110. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/auth_token/error.rs +0 -0
  111. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/auth_token/mod.rs +0 -0
  112. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/auth_token/org_auth_token.rs +0 -0
  113. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/auth_token/redacting.rs +0 -0
  114. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/auth_token/test.rs +0 -0
  115. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/auth_token/user_auth_token.rs +0 -0
  116. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/chunks.rs +0 -0
  117. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/cordova.rs +0 -0
  118. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/dif.rs +0 -0
  119. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/dif_upload.rs +0 -0
  120. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/event.rs +0 -0
  121. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/file_search.rs +0 -0
  122. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/file_upload.rs +0 -0
  123. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/formatting.rs +0 -0
  124. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/fs.rs +0 -0
  125. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/http.rs +0 -0
  126. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/logging.rs +0 -0
  127. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/metrics.rs +0 -0
  128. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/mod.rs +0 -0
  129. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/progress.rs +0 -0
  130. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/releases.rs +0 -0
  131. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/retry.rs +0 -0
  132. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_default_twenty.snap +0 -0
  133. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_ignore_missing.snap +0 -0
  134. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_base.snap +0 -0
  135. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/snapshots/sentry_cli__utils__vcs__generate_patch_set_previous_commit.snap +0 -0
  136. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/snapshots/sentry_cli__utils__vcs__get_commits_from_git.snap +0 -0
  137. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/sourcemaps/inject.rs +0 -0
  138. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/sourcemaps.rs +0 -0
  139. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/system.rs +0 -0
  140. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/ui.rs +0 -0
  141. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/update.rs +0 -0
  142. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/value_parsers.rs +0 -0
  143. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/vcs.rs +0 -0
  144. {sentry_cli-2.36.1 → sentry_cli-2.36.5}/src/utils/xcode.rs +0 -0
@@ -612,9 +612,9 @@ dependencies = [
612
612
 
613
613
  [[package]]
614
614
  name = "curl-sys"
615
- version = "0.4.72+curl-8.6.0"
615
+ version = "0.4.76+curl-8.10.1"
616
616
  source = "registry+https://github.com/rust-lang/crates.io-index"
617
- checksum = "29cbdc8314c447d11e8fd156dcdd031d9e02a7a976163e396b548c03153bc9ea"
617
+ checksum = "00462dbe9cbb9344e1b2be34d9094d74e3b8aac59a883495b335eafd02e25120"
618
618
  dependencies = [
619
619
  "cc",
620
620
  "libc",
@@ -2422,7 +2422,7 @@ dependencies = [
2422
2422
 
2423
2423
  [[package]]
2424
2424
  name = "sentry-cli"
2425
- version = "2.36.1"
2425
+ version = "2.36.5"
2426
2426
  dependencies = [
2427
2427
  "anyhow",
2428
2428
  "anylog",
@@ -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.36.1"
5
+ version = "2.36.5"
6
6
  edition = "2021"
7
7
  rust-version = "1.65"
8
8
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sentry_cli
3
- Version: 2.36.1
3
+ Version: 2.36.5
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.36.1
3
+ Version: 2.36.5
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
@@ -20,6 +20,7 @@ src/api/encoding.rs
20
20
  src/api/envelopes_api.rs
21
21
  src/api/mod.rs
22
22
  src/api/pagination.rs
23
+ src/api/data_types/deploy.rs
23
24
  src/api/data_types/mod.rs
24
25
  src/api/data_types/chunking/artifact.rs
25
26
  src/api/data_types/chunking/compression.rs
@@ -0,0 +1,29 @@
1
+ //! The `Deploy` data type.
2
+
3
+ use chrono::{DateTime, Utc};
4
+ use serde::{Deserialize, Serialize};
5
+ use std::borrow::Cow;
6
+
7
+ #[derive(Serialize, Deserialize, Debug, Default)]
8
+ pub struct Deploy<'d> {
9
+ #[serde(rename = "environment")]
10
+ pub env: Cow<'d, str>,
11
+ pub name: Option<Cow<'d, str>>,
12
+ pub url: Option<Cow<'d, str>>,
13
+ #[serde(rename = "dateStarted")]
14
+ pub started: Option<DateTime<Utc>>,
15
+ #[serde(rename = "dateFinished")]
16
+ pub finished: Option<DateTime<Utc>>,
17
+ #[serde(skip_serializing_if = "Option::is_none")]
18
+ pub projects: Option<Vec<Cow<'d, str>>>,
19
+ }
20
+
21
+ impl<'d> Deploy<'d> {
22
+ /// Returns the name of this deploy, defaulting to `"unnamed"`.
23
+ pub fn name(&self) -> &str {
24
+ match self.name.as_deref() {
25
+ Some("") | None => "unnamed",
26
+ Some(name) => name,
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,7 @@
1
+ //! Data types used in the api module
2
+
3
+ mod chunking;
4
+ mod deploy;
5
+
6
+ pub use self::chunking::*;
7
+ pub use self::deploy::*;
@@ -2359,28 +2359,6 @@ impl fmt::Display for Repo {
2359
2359
  }
2360
2360
  }
2361
2361
 
2362
- #[derive(Serialize, Deserialize, Debug, Default)]
2363
- pub struct Deploy {
2364
- #[serde(rename = "environment")]
2365
- pub env: String,
2366
- pub name: Option<String>,
2367
- pub url: Option<String>,
2368
- #[serde(rename = "dateStarted")]
2369
- pub started: Option<DateTime<Utc>>,
2370
- #[serde(rename = "dateFinished")]
2371
- pub finished: Option<DateTime<Utc>>,
2372
- }
2373
-
2374
- impl Deploy {
2375
- /// Returns the name of this deploy, defaulting to `"unnamed"`.
2376
- pub fn name(&self) -> &str {
2377
- match self.name.as_deref() {
2378
- Some("") | None => "unnamed",
2379
- Some(name) => name,
2380
- }
2381
- }
2382
- }
2383
-
2384
2362
  #[derive(Debug, Serialize, Clone)]
2385
2363
  pub struct PatchSet {
2386
2364
  pub path: String,
@@ -68,9 +68,10 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
68
68
  let api = Api::current();
69
69
  let version = config.get_release_with_legacy_fallback(matches)?;
70
70
  let mut deploy = Deploy {
71
- env: matches.get_one::<String>("env").unwrap().to_string(),
72
- name: matches.get_one::<String>("name").cloned(),
73
- url: matches.get_one::<String>("url").cloned(),
71
+ env: matches.get_one::<String>("env").unwrap().into(),
72
+ name: matches.get_one::<String>("name").map(|n| n.into()),
73
+ url: matches.get_one::<String>("url").map(|u| u.into()),
74
+ projects: matches.get_many::<String>("project").map(|x| x.into_iter().map(|x| x.into()).collect()),
74
75
  ..Default::default()
75
76
  };
76
77
 
@@ -90,8 +91,9 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
90
91
  }
91
92
 
92
93
  let org = config.get_org(matches)?;
93
- let created_deploy = api
94
- .authenticated()?
94
+ let authenticated_api = api.authenticated()?;
95
+
96
+ let created_deploy = authenticated_api
95
97
  .create_deploy(&org, &version, &deploy)?;
96
98
 
97
99
  println!(
@@ -140,7 +140,11 @@ fn execute_checkin(
140
140
  };
141
141
 
142
142
  let envelopes_api = EnvelopesApi::try_new()?;
143
- envelopes_api.send_envelope(open_checkin)?;
143
+
144
+ if let Err(e) = envelopes_api.send_envelope(open_checkin) {
145
+ log::error!("Failed to send in-progress check-in envelope: {e}");
146
+ log::info!("Continuing to run program...");
147
+ }
144
148
 
145
149
  let (success, code, elapsed) = run_program(args, monitor_slug);
146
150
 
@@ -161,7 +165,11 @@ fn execute_checkin(
161
165
  monitor_config: None,
162
166
  };
163
167
 
164
- envelopes_api.send_envelope(close_checkin)?;
168
+ if let Err(e) = envelopes_api.send_envelope(close_checkin) {
169
+ log::error!("Failed to send final check-in envelope: {e}");
170
+ log::info!("Continuing to exit with program's exit code...");
171
+ }
172
+
165
173
  Ok((success, code))
166
174
  }
167
175
 
@@ -13,6 +13,17 @@ use anyhow::Result;
13
13
  use clap::{command, Args, Subcommand};
14
14
  use clap::{ArgMatches, Command, Parser};
15
15
 
16
+ const DEPRECATION_MESSAGE: &str = "DEPRECATION NOTICE: \
17
+ The send-metric commands are deprecated and will be \
18
+ removed in the next major release. \
19
+ Sentry will reject all metrics sent after October 7, 2024. Learn more: \
20
+ https://sentry.zendesk.com/hc/en-us/articles/26369339769883-Upcoming-API-Changes-to-Metrics";
21
+
22
+ const INCREMENT_ABOUT: &str = "Increment a counter metric";
23
+ const DISTRIBUTION_ABOUT: &str = "Update a distribution metric with the provided value";
24
+ const GAUGE_ABOUT: &str = "Update a gauge metric with the provided value";
25
+ const SET_ABOUT: &str = "Update a set metric with the provided value";
26
+
16
27
  #[derive(Args)]
17
28
  pub(super) struct SendMetricArgs {
18
29
  #[command(subcommand)]
@@ -20,20 +31,26 @@ pub(super) struct SendMetricArgs {
20
31
  }
21
32
 
22
33
  #[derive(Subcommand)]
23
- #[command(about = "Send a metric to Sentry.")]
24
- #[command(long_about = "Send a metric event to Sentry.{n}{n}\
34
+ #[command(about = "[DEPRECATED] Send a metric to Sentry.")]
35
+ #[command(long_about = format!("{DEPRECATION_MESSAGE}{{n}}{{n}}\
36
+ Send a metric event to Sentry.{{n}}{{n}}\
25
37
  This command will validate input parameters and attempt to send a metric to \
26
38
  Sentry. Due to network errors and rate limits, the metric is not guaranteed to \
27
39
  arrive. Check the debug output for transmission errors by passing --log-level=\
28
- debug or setting `SENTRY_LOG_LEVEL=debug`.")]
40
+ debug or setting `SENTRY_LOG_LEVEL=debug`."))]
41
+ #[command(hide=true)]
29
42
  enum SendMetricSubcommand {
30
- #[command(about = "Increment a counter metric")]
43
+ #[command(about = format!("[DEPRECATED] {INCREMENT_ABOUT}"))]
44
+ #[command(long_about = format!("{DEPRECATION_MESSAGE}{{n}}{{n}}{INCREMENT_ABOUT}"))]
31
45
  Increment(IncrementMetricArgs),
32
- #[command(about = "Update a distribution metric with the provided value")]
46
+ #[command(about = format!("[DEPRECATED] {DISTRIBUTION_ABOUT}"))]
47
+ #[command(long_about = format!("{DEPRECATION_MESSAGE}{{n}}{{n}}{DISTRIBUTION_ABOUT}"))]
33
48
  Distribution(FloatValueMetricArgs),
34
- #[command(about = "Update a gauge metric with the provided value")]
49
+ #[command(about = format!("[DEPRECATED] {GAUGE_ABOUT}"))]
50
+ #[command(long_about = format!("{DEPRECATION_MESSAGE}{{n}}{{n}}{GAUGE_ABOUT}"))]
35
51
  Gauge(FloatValueMetricArgs),
36
- #[command(about = "Update a set metric with the provided value")]
52
+ #[command(about = format!("[DEPRECATED] {SET_ABOUT}"))]
53
+ #[command(long_about = format!("{DEPRECATION_MESSAGE}{{n}}{{n}}{SET_ABOUT}"))]
37
54
  Set(SetMetricArgs),
38
55
  }
39
56
 
@@ -48,6 +65,9 @@ pub(super) fn execute(_: &ArgMatches) -> Result<()> {
48
65
  // _ => panic!("expected send-metric subcommand"),
49
66
  // };
50
67
  let SentryCLICommand::SendMetric(SendMetricArgs { subcommand }) = SentryCLI::parse().command;
68
+
69
+ log::warn!("{DEPRECATION_MESSAGE}");
70
+
51
71
  match subcommand {
52
72
  SendMetricSubcommand::Increment(args) => increment::execute(args),
53
73
  SendMetricSubcommand::Distribution(args) => distribution::execute(args),
@@ -1,3 +0,0 @@
1
- mod chunking;
2
-
3
- pub use self::chunking::*;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes