If this package is used outside of a GCE/GKE/CloudFunction/etc. environment it produces errors like
[WARNING] googlecloudprofiler.client client.py:retrieve_gce_metadata:88 | Failed to fetch instance/zone from GCE metadata server: HTTPConnectionPool(host='metadata', port=80): Max retries exceeded with url: /computeMetadata/v1/instance/zone (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ff9e40b9128>: Failed to establish a new connection: [Errno -2] Name does not resolve',))
Having an ability to disable this metadata lookup would avoid these errors.
It's a warning level log. I don't feel it's worth to provide a flag to disable this one time warning log. But let us know if you have specific concerns.
If this package is used outside of a GCE/GKE/CloudFunction/etc. environment it produces errors like
[WARNING] googlecloudprofiler.client client.py:retrieve_gce_metadata:88 | Failed to fetch instance/zone from GCE metadata server: HTTPConnectionPool(host='metadata', port=80): Max retries exceeded with url: /computeMetadata/v1/instance/zone (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ff9e40b9128>: Failed to establish a new connection: [Errno -2] Name does not resolve',))
Having an ability to disable this metadata lookup would avoid these errors.