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

Add Error Reporting GAPIC as dependency #2894

Merged
merged 14 commits into from
Feb 14, 2017
Merged

Conversation

waprin
Copy link
Contributor

@waprin waprin commented Dec 21, 2016

Step 1 to resolving #2687. See that discussion thread for the other followups.

@bjwatson @dhermes

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 21, 2016
@waprin waprin mentioned this pull request Dec 21, 2016
@daspecster
Copy link
Contributor

@waprin I forgot, can you assign people and add labels to PRs?

@waprin
Copy link
Contributor Author

waprin commented Dec 21, 2016

I can't. Though my teammates could change that for me, up to you guys if you want us to.

@bjwatson
Copy link

@waprin I gave you one-off write access to this repo. We can refactor this as a Github team if there are other Stackdriver devs we should include (especially if you need access to multiple google-cloud-* repos).

FYI @jgeewax @daspecster @dhermes @tseaver @omaray @danoscarmike

@bjwatson
Copy link

LGTM, but I'll let @tseaver or @dhermes sign off.

@dhermes
Copy link
Contributor

dhermes commented Dec 21, 2016

This PR is pointless unless the package actually uses the depended upon package?

@waprin
Copy link
Contributor Author

waprin commented Dec 21, 2016

@dhermes the next incoming PR will actually use this client, but it's still not pointless, the idea is that we keep the pip install experience consistent whether it's handwritten or a GAPIC. You install google-cloud-* to get the clients, regardless of if the are hand-written, GAPICs, or a mix. So there will be a bunch of APIs that just have a GAPIC we just install the dependency here for. Or in cases like this, a GAPIC and then maybe some hand-written code on top. At least that's how it's been explained to me.

@dhermes
Copy link
Contributor

dhermes commented Dec 21, 2016

Yes, that's how it's been explained to me as well, but AFAIK the generated libraries are not in the "ready to go" state yet (e.g. no docs).

@bjwatson
Copy link

@dhermes We'll get on top of publishing GAPIC docs for all APIs in January. We also need to discuss how to integrate them with google-cloud-python docs as discussed in https://github.com/GoogleCloudPlatform/gcloud-common/issues/207.

@waprin waprin changed the title Add Error Reporting GAPIC as dependency Add GAX/gRPC Transport to Error Reporting Dec 29, 2016
@waprin waprin changed the title Add GAX/gRPC Transport to Error Reporting [ROUGH DRAFT] Add Error Reporting GAPIC as dependency Dec 29, 2016
@waprin
Copy link
Contributor Author

waprin commented Dec 29, 2016

@dhermes @bjwatson @steren this is not remotely ready for thorough review (missing tests, docs, lots of stye issues) but I wanted to throw up the commits to give the rough sketch of adding the GAPIC as a transport for the helper API, make sure it's all LGTM to you guys and then I'll clean up the PR to merge it.

This is basically what Steren and I had discussed a few weeks ago.

  • Copies the basic GAX/non-GAX structure of the logging client
  • Unlike the logging client, instead of falling back to an HTTP client, it falls back to the logging client itself, now in _logging
  • Basic instrumentation/helper library API remains the same, code to build the error report payload is shared

If you all feel good about this I'll finish up the tests/docs/style issues.

Obviously not expecting any response on this until 2017, happy new year! 🎉 🎉 🎈 🎈

@waprin
Copy link
Contributor Author

waprin commented Jan 3, 2017

@dhermes @bjwatson @steren ping for the new year. again, just looking for an initial +1 to basic direction here before I finish tests/docs.

@bjwatson
Copy link

bjwatson commented Jan 4, 2017

Thanks @waprin. Looks reasonable to me based on a superficial review.

@lukesneeringer Can you take a more detailed look? This should have a similar structure to the Logging code that you've looked at already.

@waprin
Copy link
Contributor Author

waprin commented Jan 4, 2017

Cool ty, will finish it up then.

@steren
Copy link

steren commented Jan 4, 2017

The direction LGTM.

Would you mind also update the doc, so that I better understand how the end user will configure and use the module in its various variants?

In general, a parameter like use_gax is very cryptic to anybody who does not know what gax is (I guess most users).

Will this work also allow to call, for example, the list groupStat endpoint from the module?

@waprin
Copy link
Contributor Author

waprin commented Jan 12, 2017

@bjwatson @lukesneeringer cool ty, I wanted to ask, do we need the secure channel stuff? Is there a high level overview of that?

One other problem I've run into is that Error Reporting depends on gax 0.14 but logging (which Error Reporting uses as the fallback) depends on 0.15, and ssl_creds changed to ssl_credentials. Wonder if we can just update the error reporting gax dependency?

@steren will try to clarify the gRPC stuff.

Since we are adding the GAPIC to the module, all the autogenned VTK calls will be included as a dependency. Documentation of all those calls is still a TODO as noted above. For now this just adds the GAPIC library to this one and uses it for the handwritten helper functions.

@bjwatson
Copy link

@waprin I believe we'll need to regenerate the GAPIC code to work with GAX 0.15. Is that correct @geigerj?

The changes allow us to use @jonparrott's new google-auth library, rather than requiring the broken old oauth2client.

@geigerj
Copy link
Contributor

geigerj commented Jan 12, 2017

@bjwatson Yes, we should regenerate the GAPIC library to use GAX 0.15.0.

@waprin waprin changed the title [ROUGH DRAFT] Add Error Reporting GAPIC as dependency Add Error Reporting GAPIC as dependency Jan 27, 2017
@waprin
Copy link
Contributor Author

waprin commented Jan 30, 2017

@dhermes this is ready for review

Copy link
Contributor

@lukesneeringer lukesneeringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly seems fine -- there are a couple spots where I need clarification (or possibly changes).

import traceback

import google.cloud.logging.client
try:

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


from google.cloud.gapic.errorreporting.v1beta1 import (
report_errors_service_client)
from google.cloud.grpc.devtools.clouderrorreporting.v1beta1 import (

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@waprin waprin merged commit ee4f2ad into googleapis:master Feb 14, 2017
@dhermes dhermes added api: clouderrorreporting Issues related to the Error Reporting API. and removed api: clouderrorreporting Issues related to the Error Reporting API. labels Feb 23, 2017
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
* Add Error Reporting GAPIC as dependency

This both adds the GAPIC to be used directly via this package, as well as hooking it up to the existing helpers to provide gRPC support.
parthea pushed a commit that referenced this pull request Oct 21, 2023
…udPlatform/python-docs-samples#3698)

fixes #2894

Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>
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. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants