Skip to content

Commit

Permalink
Release 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
konraddysput committed Sep 30, 2024
1 parent eb05a6e commit 39aa67d
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Version 0.4.1

- Added support for annotations in the client API (#23),
- Dropped environment variable as a default annotation (#23),
- Added an exit_timeout parameter, that allows to wait until events are processed before exit (#24).

# Version 0.4.0

- Changed a submission flow - from spawning and sending data from a process to background thread(#19).
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016 Backtrace I/O, Inc.
Copyright (c) 2024 Backtrace I/O, Inc.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include README.md
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@

## Documentation

https://support.backtrace.io/hc/en-us/articles/360040105992-Python-Integration-Guide
https://docs.saucelabs.com/error-reporting/language-integrations/python/

## Installation

### Requirements

This module supports Python 2, Python 3, and PyPy.

```
```bash
python -m pip install backtracepython
```

## Basic Usage

```python
```bash
import backtracepython as bt
bt.initialize(
    endpoint="https://submit.backtrace.io/{universe}/{token}/json"
Expand Down Expand Up @@ -62,42 +62,42 @@ except:

Create a report object that you can later choose whether or not to send. This may be useful to track something like a request.

`report.set_attribute(key, value) `
`report.set_attribute(key, value)`
Adds an attribute to a specific report. Valid types for value are str, float, int, and bool.
Attributes are indexed and searchable. See also `addAnnotation`

`report.set_dict_attributes(dict)`

Adds all key-value pairs of dict into the report recursively.

`report.get_attributes() `
`report.get_attributes()`

Returns all report attributes.

`report.set_annotation(key, value) `
`report.set_annotation(key, value)`

Adds an annotation to a specific report. Annotations, unlike attributes, are not indexed and searchable. However, they are available for inspection when you view a specific report.

key - String which is the name of the annotation.
value - Any type which is JSON-serializable.

`report.set_dict_annotations(dict) `
`report.set_dict_annotations(dict)`

Adds all key-value pairs of dict into the report.

`report.add_attachment(attachment_path) `
`report.add_attachment(attachment_path)`

Adds an attachment to the report.

`report.get_attachments() `
`report.get_attachments()`

Returns a list of attachment paths.

`report.set_exception(ExceptionType, exception, traceback)`

error  is an Error object. Backtrace will extract information from this object such as the error message and stack trace and send this information along with the report.

`report.capture_last_exception() `
`report.capture_last_exception()`

This is the same as report.set_exception(\*sys.exc_info())

Expand All @@ -118,7 +118,7 @@ Sends the error report to the endpoint specified in initialize.

To run the test suite:

```
```bash
pytest
```

Expand All @@ -135,7 +135,7 @@ test suite with all of them:
2. Update version number in backtracepython module.
3. Tag the version in git.

```
```bash
python3 setup.py bdist_wheel --universal
twine upload dist/*
```
2 changes: 1 addition & 1 deletion backtracepython/version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class version:
major = 0
minor = 4
patch = 0
patch = 1


version_string = "{}.{}.{}".format(version.major, version.minor, version.patch)
19 changes: 18 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
#!/usr/bin/env python

import os

from setuptools import find_packages, setup

current_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(current_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()


setup(
name="backtracepython",
version="0.4.0",
version="0.4.1",
description="Backtrace.io error reporting tool for Python",
author="Backtrace.io",
author_email="team@backtrace.io",
packages=find_packages(),
long_description=long_description,
long_description_content_type="text/markdown",
include_package_data=True,
license="MIT",
test_suite="tests",
url="https://github.com/backtrace-labs/backtrace-python",
install_requires=["six", "simplejson", "requests"],
extras_require={
"test": ["pytest"],
},
project_urls={
"Homepage": "https://backtrace.io",
"Source": "https://github.com/backtrace-labs/backtrace-python",
"Changelog": "https://github.com/backtrace-labs/backtrace-python/blob/master/CHANGELOG.md",
"Documentation": "https://docs.saucelabs.com/error-reporting/language-integrations/python/",
},
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4",
classifiers=[
"Programming Language :: Python :: 2.7",
Expand Down

0 comments on commit 39aa67d

Please sign in to comment.