-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: clouderrorreportingIssues related to the Error Reporting API.Issues related to the Error Reporting API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
I had tried to use error reporting module to trace my errors of my system. I found that http_context is not reported. After I check the document of stack driver error reporting, I found there is a bug there. The fix is simple. Just modify file at
google/cloud/error_reporting/client.py:174
from
payload['context']['httpContext'] = {to
payload['context']['httpRequest'] = {The code to reproduce is list below,
from google.cloud import error_reporting
cli = error_reporting.Client(service='python_test')
context = error_reporting.client.HTTPContext(
method='GET',
url='http://test.com',
user_agent='Chrome',
referrer='http://referer.com',
response_status_code=400,
remote_ip= '8.8.8.8',
)
cli.report('error report test', http_context=context)Environment
OS: MAC Python 2.7.10 google-cloud-error-reporting==0.22.0
Metadata
Metadata
Assignees
Labels
api: clouderrorreportingIssues related to the Error Reporting API.Issues related to the Error Reporting API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.