@@ -75,9 +75,10 @@ be used by Stackdriver Error Reporting to help group exceptions.
7575 >> > from google.cloud import error_reporting
7676 >> > client = error_reporting.Client()
7777 >> > user = ' example@gmail.com'
78- >> > http_context = HTTPContext(method = ' GET' , url = ' /' , userAgent = ' test agent' ,
79- ... referrer = ' example.com' , responseStatusCode = 500 ,
80- ... remote_ip = ' 1.2.3.4' )
78+ >> > http_context = error_reporting.HTTPContext(
79+ ... method = ' GET' , url = ' /' , user_agent = ' test agent' ,
80+ ... referrer = ' example.com' , response_status_code = 500 ,
81+ ... remote_ip = ' 1.2.3.4' )
8182 >> > try :
8283 >> > raise NameError
8384 >> > except Exception :
@@ -116,7 +117,8 @@ Similarly to reporting an exception, the user and HTTP context can be provided:
116117 >> > from google.cloud import error_reporting
117118 >> > client = error_reporting.Client()
118119 >> > user = ' example@gmail.com'
119- >> > http_context = HTTPContext(method = ' GET' , url = ' /' , userAgent = ' test agent' ,
120- ... referrer = ' example.com' , responseStatusCode = 500 ,
121- ... remote_ip = ' 1.2.3.4' )
120+ >> > http_context = error_reporting.HTTPContext(
121+ ... method = ' GET' , url = ' /' , user_agent = ' test agent' ,
122+ ... referrer = ' example.com' , response_status_code = 500 ,
123+ ... remote_ip = ' 1.2.3.4' )
122124 >> > error_reporting.report(" Found an error!" , http_context = http_context, user = user))
0 commit comments