Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions clients/python/src/objectstore_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,13 @@ class Client:
"http://objectstore:8888"). metrics_backend: Optional metrics backend for
tracking storage operations. Defaults to ``NoOpMetricsBackend`` if not
provided.
propagate_traces: Whether to propagate Sentry trace headers in requests to
objectstore. Defaults to ``False``.
propagate_traces: **Deprecated.** Use Sentry's ``StdlibIntegration``
instead; it propagates traces on the underlying HTTP request
regardless of this flag, unless the host application's Sentry SDK
is configured to opt out.

This only controls headers this client adds itself. Defaults to
``False``.
retries: Number of connection retries for failed requests.
Defaults to ``3`` if not specified. **Note:** only connection failures are
retried, not read failures (as compression streams cannot be rewound).
Expand Down Expand Up @@ -146,6 +151,14 @@ def __init__(
connection_kwargs: Mapping[str, Any] | None = None,
token: TokenProvider | None = None,
):
if propagate_traces:
warnings.warn(
"`propagate_traces` is deprecated; Sentry's `StdlibIntegration` "
"already propagates traces on the underlying HTTP request",
DeprecationWarning,
stacklevel=2,
)

connection_kwargs_to_use = asdict(_ConnectionDefaults())

if retries:
Expand Down
Loading