Skip to content

Commit 43dbfc8

Browse files
authored
Verify if api is realtime before getting request metrics (#1795)
1 parent 3857efd commit 43dbfc8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cli/cmd/logs.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/cortexlabs/cortex/pkg/lib/exit"
2222
"github.com/cortexlabs/cortex/pkg/lib/prompt"
2323
"github.com/cortexlabs/cortex/pkg/lib/telemetry"
24+
"github.com/cortexlabs/cortex/pkg/types/userconfig"
2425
"github.com/spf13/cobra"
2526
)
2627

@@ -67,7 +68,7 @@ var _logsCmd = &cobra.Command{
6768
exit.Error(err)
6869
}
6970

70-
if apiResponse[0].Status.Requested > 1 && !_flagLogsDisallowPrompt {
71+
if apiResponse[0].Spec.Kind == userconfig.RealtimeAPIKind && apiResponse[0].Status.Requested > 1 && !_flagLogsDisallowPrompt {
7172
prompt.YesOrExit("logs from a single random replica will be streamed\n\nfor aggregated logs please visit your cloud provider's logging dashboard; see https://docs.cortex.dev for details", "", "")
7273
}
7374

0 commit comments

Comments
 (0)