Skip to content

Commit 53ccdf6

Browse files
fix(logs): Mark logs command as beta
Sentry's Logs feature is in beta. The commands therefore also should have been explicitly marked as beta.
1 parent cdc9c3b commit 53ccdf6

File tree

6 files changed

+25
-7
lines changed

6 files changed

+25
-7
lines changed

src/commands/logs/mod.rs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ use anyhow::Result;
66
use clap::ArgMatches;
77
use clap::{Args, Command, Parser as _, Subcommand};
88

9+
const BETA_WARNING: &str = "[BETA] The \"logs\" command is in beta. The command is subject \
10+
to breaking changes, including removal, in any Sentry CLI release.";
11+
912
const LIST_ABOUT: &str = "List logs from your organization";
1013

1114
#[derive(Args)]
@@ -15,14 +18,19 @@ pub(super) struct LogsArgs {
1518
}
1619

1720
#[derive(Subcommand)]
18-
#[command(about = "Manage logs in Sentry")]
19-
#[command(long_about = "Manage and query logs in Sentry. \
20-
This command provides access to log entries.")]
21+
#[command(about = "[BETA] Manage logs in Sentry")]
22+
#[command(long_about = format!(
23+
"Manage and query logs in Sentry. \
24+
This command provides access to log entries.\n\n\
25+
{BETA_WARNING}")
26+
)]
2127
enum LogsSubcommand {
22-
#[command(about = LIST_ABOUT)]
28+
#[command(about = format!("[BETA] {LIST_ABOUT}"))]
2329
#[command(long_about = format!("{LIST_ABOUT}. \
2430
Query and filter log entries from your Sentry projects. \
25-
Supports filtering by log level and custom queries."))]
31+
Supports filtering by log level and custom queries.\n\n\
32+
{BETA_WARNING}")
33+
)]
2634
List(ListLogsArgs),
2735
}
2836

@@ -35,6 +43,8 @@ pub(super) fn execute(_: &ArgMatches) -> Result<()> {
3543
unreachable!("expected logs subcommand");
3644
};
3745

46+
eprintln!("{BETA_WARNING}");
47+
3848
match subcommand {
3949
LogsSubcommand::List(args) => list::execute(args),
4050
}

tests/integration/_cases/help/help.trycmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Commands:
1717
info Print information about the configuration and verify authentication.
1818
issues Manage issues in Sentry.
1919
login Authenticate with the Sentry server.
20-
logs Manage logs in Sentry
20+
logs [BETA] Manage logs in Sentry
2121
monitors Manage cron monitors on Sentry.
2222
organizations Manage organizations on Sentry.
2323
projects Manage projects on Sentry.

tests/integration/_cases/logs/logs-help.trycmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ $ sentry-cli logs --help
33
? success
44
Manage and query logs in Sentry. This command provides access to log entries.
55

6+
[BETA] The "logs" command is in beta. The command is subject to breaking changes, including removal,
7+
in any Sentry CLI release.
8+
69
Usage: sentry-cli[EXE] logs [OPTIONS] [COMMAND]
710

811
Commands:
9-
list List logs from your organization
12+
list [BETA] List logs from your organization
1013
help Print this message or the help of the given subcommand(s)
1114

1215
Options:

tests/integration/_cases/logs/logs-list-help.trycmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ $ sentry-cli logs list --help
44
List logs from your organization. Query and filter log entries from your Sentry projects. Supports
55
filtering by log level and custom queries.
66

7+
[BETA] The "logs" command is in beta. The command is subject to breaking changes, including removal,
8+
in any Sentry CLI release.
9+
710
Usage: sentry-cli[EXE] logs list [OPTIONS]
811

912
Options:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
```
22
$ sentry-cli logs list --org wat-org --project 12345
33
? success
4+
[BETA] The "logs" command is in beta. The command is subject to breaking changes, including removal, in any Sentry CLI release.
45
No logs found
56

67
```

tests/integration/_cases/logs/logs-list-with-data.trycmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
```
22
$ sentry-cli logs list
33
? success
4+
[BETA] The "logs" command is in beta. The command is subject to breaking changes, including removal, in any Sentry CLI release.
45
+------------------+---------------------------+----------+--------------------------+----------------------+
56
| Item ID | Timestamp | Severity | Message | Trace |
67
+------------------+---------------------------+----------+--------------------------+----------------------+

0 commit comments

Comments
 (0)