Skip to content
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

StackDriver Error reporting payload key is wrong #3315

Closed
bmorgan21 opened this issue Apr 19, 2017 · 6 comments
Closed

StackDriver Error reporting payload key is wrong #3315

bmorgan21 opened this issue Apr 19, 2017 · 6 comments
Assignees
Labels
api: clouderrorreporting Issues related to the Error Reporting API.

Comments

@bmorgan21
Copy link

https://github.com/GoogleCloudPlatform/google-cloud-python/blob/0.24.0/error_reporting/google/cloud/error_reporting/client.py#L227

I believe this like should set the payload context key to httpRequest and NOT httpContext. This would make it match the spec.

https://cloud.google.com/error-reporting/docs/formatting-error-messages

Right now the report_exception call is throwing an error when using grpc and not populating the data with the http api usage.

google.protobuf.json_format.ParseError: Message type "google.devtools.clouderrorreporting.v1beta1.ErrorContext" has no field named "httpContext".

@bmorgan21
Copy link
Author

bmorgan21 commented Apr 19, 2017

here is a code snippet that at least gets the data to show up.


class MyClient(error_reporting.Client):

        def _build_error_report(self, *args, **kwargs):
            payload = super(MyClient, self)._build_error_report(*args, **kwargs)

            if 'context' in payload:
                data = payload['context'].pop('httpContext', None)
                if data:
                    payload['context']['httpRequest'] = data

            return payload

@dhermes dhermes added the api: clouderrorreporting Issues related to the Error Reporting API. label Apr 19, 2017
@dhermes
Copy link
Contributor

dhermes commented Apr 19, 2017

Thanks for reporting @bmorgan21, this was fixed in #3299. It seems we should get a release out soon?

@dhermes dhermes closed this as completed Apr 19, 2017
@bmorgan21
Copy link
Author

thanks.

is there a dev build I can use? vs having to patch the broken code?

@lukesneeringer
Copy link
Contributor

@dhermes Go ahead and cut a release. Thanks!

@dhermes
Copy link
Contributor

dhermes commented Apr 19, 2017

@bmorgan21
Copy link
Author

@dhermes thank you for the quick turnaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: clouderrorreporting Issues related to the Error Reporting API.
Projects
None yet
Development

No branches or pull requests

3 participants