8890358aa13e3cae965422a8dd86dbb0832fcebe,datalab/stackdriver/monitoring/_utils.py,,make_client,#Any#Any#,22
Before Change
def make_client(project_id=None, context=None):
context = context or datalab.context.Context.default()
project_id = project_id or context.project_id
return google.cloud.monitoring.Client(
project=project_id,
credentials=context.credentials,
)
After Change
def make_client(project_id=None, context=None):
context = context or datalab.context.Context.default()
project_id = project_id or context.project_id
client = google.cloud.monitoring.Client(
project=project_id,
credentials=context.credentials,
)
client._connection_class.USER_AGENT = "pydatalab/v0"
return client
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 5
Instances
Project Name: googledatalab/pydatalab
Commit Name: 8890358aa13e3cae965422a8dd86dbb0832fcebe
Time: 2016-11-14
Author: supriyagarg@users.noreply.github.com
File Name: datalab/stackdriver/monitoring/_utils.py
Class Name:
Method Name: make_client
Project Name: ray-project/ray
Commit Name: aab7ccc46689bb41a66c572acb1a1619fe23dc20
Time: 2021-03-17
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/api.py
Class Name:
Method Name: start
Project Name: studioml/studio
Commit Name: c8b86578601bcb5dc00732bdf444d22319a633a7
Time: 2018-03-07
Author: peter.zhokhov@sentient.ai
File Name: studio/gcloud_artifact_store.py
Class Name: GCloudArtifactStore
Method Name: get_client
Project Name: ray-project/ray
Commit Name: aab7ccc46689bb41a66c572acb1a1619fe23dc20
Time: 2021-03-17
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/api.py
Class Name:
Method Name: connect
Project Name: GoogleCloudPlatform/professional-services
Commit Name: 4d812aeda5ae9235f239a3a766f07c11b499606b
Time: 2019-01-03
Author: pkattamuri@google.com
File Name: tools/hive-bigquery/gcs_storage_component.py
Class Name: GCSStorageComponent
Method Name: get_client