-
Notifications
You must be signed in to change notification settings - Fork 6.5k
migrate code from googleapis/python-error-reporting #8480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
51a3baa
chore: move samples from python-docs-sample (#18)
arithmetic1728 ff496e0
chore(deps): update dependency google-cloud-error-reporting to v1 (#26)
renovate-bot 033d786
chore(deps): update dependency google-cloud-error-reporting to v1.1.0…
renovate-bot c263ac6
chore(deps): update dependency google-cloud-error-reporting to v1.1.1…
renovate-bot 12dd93a
chore(deps): update dependency google-cloud-error-reporting to v1.1.2…
renovate-bot 72e3f9e
chore(deps): update dependency pytest to v6.2.4 (#117)
renovate-bot 47d4a8a
chore(deps): update dependency google-cloud-error-reporting to v1.2.0…
renovate-bot 8e86c82
chore(deps): update dependency google-cloud-error-reporting to v1.2.1…
renovate-bot b8b1d9e
chore(deps): update dependency google-cloud-error-reporting to v1.2.2…
renovate-bot 78508fc
chore(deps): update dependency pytest to v6.2.5 (#168)
renovate-bot 6b06bfe
chore(deps): update dependency google-cloud-error-reporting to v1.2.3…
renovate-bot 56d5fe0
chore(deps): update dependency google-cloud-error-reporting to v1.3.0…
renovate-bot 4a4bb00
chore(deps): update dependency google-cloud-error-reporting to v1.4.0…
renovate-bot 955cde2
chore(deps): update dependency google-cloud-error-reporting to v1.4.1…
renovate-bot 051fe8b
chore(deps): update all dependencies (#224)
renovate-bot 69019a9
chore(deps): update dependency pytest to v7.0.1 (#229)
renovate-bot b539f89
chore(deps): update dependency google-cloud-error-reporting to v1.5.0…
renovate-bot bfb6f0a
chore(deps): update dependency google-cloud-error-reporting to v1.5.1…
renovate-bot eace1b0
chore(deps): update dependency pytest to v7.1.0 (#247)
renovate-bot 7117a86
chore(deps): update dependency pytest to v7.1.1 (#249)
renovate-bot 2b87555
chore(deps): update dependency google-cloud-error-reporting to v1.5.2…
renovate-bot 133dfde
chore(deps): update dependency pytest to v7.1.2 (#270)
renovate-bot b5daf79
chore(deps): update all dependencies (#351)
renovate-bot 6812f23
chore(deps): update all dependencies (#363)
renovate-bot 9f44bbf
chore(deps): update dependency google-cloud-error-reporting to v1.6.1…
renovate-bot 3025c5d
chore(deps): update dependency pytest to v7.1.3 (#381)
renovate-bot fb6b876
chore(deps): update dependency google-cloud-error-reporting to v1.6.2…
renovate-bot f62bee7
chore(deps): update dependency google-cloud-error-reporting to v1.6.3…
renovate-bot db60f6e
chore(deps): update dependency pytest to v7.2.0 (#395)
renovate-bot 9526db8
Merge remote-tracking branch 'migration/main' into python-error-repor…
msampathkumar 0e75c8c
Mulitple update
msampathkumar 6e19c76
fix closing tag for error_reporting_setup_python_manual
msampathkumar 810cb45
Merge branch 'main' into python-error-reporting-migration
msampathkumar 38d7471
Merge branch 'main' into python-error-reporting-migration
msampathkumar 7faa958
Merge branch 'main' into python-error-reporting-migration
msampathkumar 08b3dce
Merge branch 'main' into python-error-reporting-migration
msampathkumar bd176e5
Clear `error_reporting` tag
msampathkumar feb4966
Update code owners as found in https://github.com/googleapis/python-e…
msampathkumar b450276
Update code owners as found in https://github.com/googleapis/python-e…
msampathkumar 0e2a1a4
Merge branch 'main' into python-error-reporting-migration
msampathkumar f6c99eb
Update .github/CODEOWNERS
msampathkumar fc08600
Merge branch 'main' into python-error-reporting-migration
msampathkumar 9c8970f
Update CODEOWNERS & blunderbuss.yml
msampathkumar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env python | ||
# | ||
# Copyright 2022 Google, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
# [START error_reporting_quickstart] | ||
# [START error_reporting_setup_python] | ||
def simulate_error(): | ||
from google.cloud import error_reporting | ||
|
||
client = error_reporting.Client() | ||
try: | ||
# simulate calling a method that's not defined | ||
raise NameError | ||
except Exception: | ||
client.report_exception() | ||
# [END error_reporting_setup_python] | ||
# [END error_reporting_quickstart] | ||
|
||
|
||
# [START error_reporting_manual] | ||
# [START error_reporting_setup_python_manual] | ||
def report_manual_error(): | ||
from google.cloud import error_reporting | ||
|
||
client = error_reporting.Client() | ||
client.report("An error has occurred.") | ||
# [END error_reporting_setup_python_manual] | ||
# [END error_reporting_manual] | ||
|
||
|
||
if __name__ == '__main__': | ||
simulate_error() | ||
report_manual_error() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env python | ||
# | ||
# Copyright 2022 Google, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import report_exception | ||
|
||
|
||
def test_error_sends(): | ||
report_exception.simulate_error() | ||
|
||
|
||
def test_manual_error_sends(): | ||
report_exception.report_manual_error() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pytest==7.2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
google-cloud-error-reporting==1.6.3 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.