Skip to content

release: 1.6.1#380

Merged
viveknair merged 3 commits intomainfrom
release-please--branches--main--changes--next
Aug 22, 2025
Merged

release: 1.6.1#380
viveknair merged 3 commits intomainfrom
release-please--branches--main--changes--next

Conversation

@stainless-app
Copy link
Contributor

@stainless-app stainless-app bot commented Aug 22, 2025

Automated Release PR

1.6.1 (2025-08-22)

Full Changelog: v1.6.0...v1.6.1

Bug Fixes

  • otel: add stable vendored OTLP exporter (#378) (14895fc)

Chores

  • deps: update opentelemetry version bounds (54a804a)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions

@graphite-app
Copy link
Contributor

graphite-app bot commented Aug 22, 2025

How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@stainless-app
Copy link
Contributor Author

stainless-app bot commented Aug 22, 2025

🧪 Testing

To try out this version of the SDK, run:

pip install 'https://pkg.stainless.com/s/gentrace-python/14895fc832cf4f667afa2dfbd5ce05e0dd9473dc/gentrace_py-1.6.0-py3-none-any.whl'

Expires: Sun, 21 Sep 2025 21:09:24 GMT

Comment on lines +287 to +293
except requests.exceptions.ConnectionError:
# Retry once on connection error
return self._session.post(
url=self._endpoint, # type: ignore[arg-type]
data=data,
timeout=timeout,
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The connection error retry logic has a potential issue - it currently retries exactly once after a ConnectionError without handling failures in the retry attempt. If the retry also fails with a ConnectionError, that exception will propagate unhandled up the call stack, potentially causing application crashes.

Consider improving this by either:

  1. Wrapping the retry in its own try-except block
  2. Letting the exception propagate to the main error handling logic

Example of a more robust approach:

try:
    return self._session.post(url=self._endpoint, data=data, timeout=timeout)
except requests.exceptions.ConnectionError:
    try:
        # One retry attempt
        return self._session.post(url=self._endpoint, data=data, timeout=timeout)
    except Exception as e:
        # Let the caller handle this error appropriately
        raise
Suggested change
except requests.exceptions.ConnectionError:
# Retry once on connection error
return self._session.post(
url=self._endpoint, # type: ignore[arg-type]
data=data,
timeout=timeout,
)
except requests.exceptions.ConnectionError:
# Retry once on connection error
try:
return self._session.post(
url=self._endpoint, # type: ignore[arg-type]
data=data,
timeout=timeout,
)
except Exception as e:
# Let the caller handle this error appropriately
raise

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@viveknair viveknair merged commit cc6a760 into main Aug 22, 2025
24 of 25 checks passed
@stainless-app stainless-app bot deleted the release-please--branches--main--changes--next branch August 22, 2025 21:11
@stainless-app
Copy link
Contributor Author

stainless-app bot commented Aug 22, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant