I'd like to use the Google Error Reporting Client library (from google.cloud import error_reporting).
Basically, you instantiate a client:
client = error_reporting.Client(service="my_script", version="my_version")
and then you can raise error using:
client.report("my message")
orclient.report_exception()
when an exception is caught
I have 3 environments (prod, staging and dev). They are each setup on their own Kubernetes cluster (with their own namespace). When I look at Google Cloud Error Reporting dashboard, I would to quickly locate on which environment and which class/script the error was raised.
Using service is a natural choice to describe the class/script but what about the environment? What is the best practice? Should I use the version to store that, e.g. version="staging_0.0.2"?
Many thanks in advance Cheers, Lamp'