deepctl 0.2.23__tar.gz → 0.2.25__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepctl
3
- Version: 0.2.23
3
+ Version: 0.2.25
4
4
  Summary: Official Deepgram CLI for speech recognition and audio intelligence
5
5
  Author-email: Deepgram <devrel@deepgram.com>
6
6
  Maintainer-email: Deepgram <devrel@deepgram.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "deepctl"
7
- version = "0.2.23" # x-release-please-version
7
+ version = "0.2.25" # x-release-please-version
8
8
  description = "Official Deepgram CLI for speech recognition and audio intelligence"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,7 +1,7 @@
1
1
  """deepctl - Official command-line interface for Deepgram's speech
2
2
  recognition API."""
3
3
 
4
- __version__ = "0.2.23" # x-release-please-version
4
+ __version__ = "0.2.25" # x-release-please-version
5
5
  __author__ = "Deepgram"
6
6
  __email__ = "devrel@deepgram.com"
7
7
  __license__ = "MIT"
@@ -1,9 +1,16 @@
1
1
  """Main entry point for deepctl."""
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  import importlib.metadata
4
6
  import sys
7
+ from contextlib import contextmanager
8
+ from typing import TYPE_CHECKING
5
9
 
6
10
  import click
11
+
12
+ if TYPE_CHECKING:
13
+ from collections.abc import Iterator
7
14
  from deepctl_core import (
8
15
  Config,
9
16
  TimingContext,
@@ -228,6 +235,27 @@ def load_commands() -> None:
228
235
  load_commands()
229
236
 
230
237
 
238
+ @contextmanager
239
+ def _telemetry_transaction() -> Iterator[None]:
240
+ """Wrap CLI dispatch in a Sentry transaction (no-op when telemetry is off).
241
+
242
+ The transaction is named generically ('cli') here. BaseCommand.execute
243
+ renames it to the full Click command path (e.g. 'deepctl debug audio')
244
+ once Click has dispatched — which is the single source of truth for
245
+ the name. Trying to extract a command name from raw sys.argv is unsafe
246
+ because flag values can look like command names ('--output json' makes
247
+ 'json' look like a command).
248
+ """
249
+ try:
250
+ import sentry_sdk
251
+ except ImportError:
252
+ yield
253
+ return
254
+
255
+ with sentry_sdk.start_transaction(op="cli.command", name="cli"):
256
+ yield
257
+
258
+
231
259
  def main() -> None:
232
260
  """Main entry point for the CLI."""
233
261
  try:
@@ -294,8 +322,7 @@ def main() -> None:
294
322
  # Preprocess arguments to handle hyphenated commands
295
323
  processed_args = preprocess_hyphenated_commands(args)
296
324
 
297
- with TimingContext("cli_execution"):
298
- # Call CLI with processed arguments
325
+ with TimingContext("cli_execution"), _telemetry_transaction():
299
326
  try:
300
327
  cli(args=processed_args, standalone_mode=False)
301
328
  except SystemExit:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepctl
3
- Version: 0.2.23
3
+ Version: 0.2.25
4
4
  Summary: Official Deepgram CLI for speech recognition and audio intelligence
5
5
  Author-email: Deepgram <devrel@deepgram.com>
6
6
  Maintainer-email: Deepgram <devrel@deepgram.com>
File without changes
File without changes
File without changes