GoogleCloudPlatform / opentelemetry-operations-python

OpenTelemetry Python exporters for Google Cloud Monitoring and Trace
https://google-cloud-opentelemetry.readthedocs.io/en/stable/
Apache License 2.0
64 stars 45 forks source link

Don't throw and exception when raise on error is set to false #293

Closed Tasty213 closed 1 year ago

Tasty213 commented 1 year ago

As raised in #276 and in compliance with the specification make it so that running the detect method on a detector with raise_on_error set to false doesn't throw an exception if it can't find any GCP resources.

google-cla[bot] commented 1 year ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

aabmass commented 1 year ago

@Tasty213 can you sign the CLA?

Tasty213 commented 1 year ago

I think I've already done so? The check shows as passed

Tasty213 commented 1 year ago

fixed the linter error

aabmass commented 1 year ago

/gcbrun

Tasty213 commented 1 year ago

Could've sworn the linter passed locally

aabmass commented 1 year ago

Could've sworn the linter passed locally

Could be some weird flake in the CI setup. Lmk if you have trouble getting it to pass in CI and I can try to fix it

Tasty213 commented 1 year ago

Figured out what was wrong with my local testing, I use Windows and have git to checkout CRLF and commit LF, so when I ran the linter locally every single file threw a warning as it was in the 'wrong' line ending style giving pylint unexpected-line-ending-format. I've set pycharm to force everything in the project to LF but now git reckons I've changed every file (until I try and stage and it realises I haven't).

Either way this should now pass the lint step.

aabmass commented 1 year ago

/gcbrun