diff --git a/functions/ocr/app/main.py b/functions/ocr/app/main.py index 186c9abfaaa..66c1c850863 100644 --- a/functions/ocr/app/main.py +++ b/functions/ocr/app/main.py @@ -69,7 +69,7 @@ def detect_text(bucket: str, filename: str) -> None: filename: name of the file to be read. Returns: - None; the output is written to stdout and Stackdriver Logging. + None; the output is written to stdout and cloud logging. """ print("Looking for text in image {}".format(filename)) @@ -123,7 +123,7 @@ def process_image(file_info: dict, context: dict) -> None: context: a dictionary containing metadata about the event. Returns: - None; the output is written to stdout and Stackdriver Logging. + None; the output is written to stdout and cloud logging. """ bucket = validate_message(file_info, "bucket") name = validate_message(file_info, "name") @@ -148,7 +148,7 @@ def translate_text(event: dict, context: dict) -> None: context: a dictionary containing metadata about the event. Returns: - None; the output is written to stdout and Stackdriver Logging. + None; the output is written to stdout and cloud logging. """ if event.get("data"): message_data = base64.b64decode(event["data"]).decode("utf-8") @@ -189,7 +189,7 @@ def save_result(event: dict, context: dict) -> None: context: a dictionary containing metadata about the event. Returns: - None; the output is written to stdout and Stackdriver Logging. + None; the output is written to stdout and cloud logging. """ if event.get("data"): message_data = base64.b64decode(event["data"]).decode("utf-8") diff --git a/functions/tips-retry/main.py b/functions/tips-retry/main.py index 847ae6394dc..dfe11942af2 100644 --- a/functions/tips-retry/main.py +++ b/functions/tips-retry/main.py @@ -27,7 +27,7 @@ def retry_or_not(data, context): data (dict): The event payload. context (google.cloud.functions.Context): The event metadata. Returns: - None; output is written to Stackdriver Logging + None; output is written to Cloud Logging """ # Retry based on a user-defined parameter diff --git a/functions/v2/tips-avoid-infinite-retries/main.py b/functions/v2/tips-avoid-infinite-retries/main.py index e3b735f2f74..9e751d5d0b5 100644 --- a/functions/v2/tips-avoid-infinite-retries/main.py +++ b/functions/v2/tips-avoid-infinite-retries/main.py @@ -29,7 +29,7 @@ def avoid_infinite_retries(cloud_event): Args: cloud_event: The cloud event associated with the current trigger Returns: - None; output is written to Stackdriver Logging + None; output is written to Cloud Logging """ timestamp = cloud_event["time"] diff --git a/functions/v2/tips-retry/main.py b/functions/v2/tips-retry/main.py index 7ff58a954ff..91ce20b8468 100644 --- a/functions/v2/tips-retry/main.py +++ b/functions/v2/tips-retry/main.py @@ -31,7 +31,7 @@ def retry_or_not(cloud_event): Args: cloud_event: The cloud event with a Pub/Sub data payload Returns: - None; output is written to Stackdriver Logging + None; output is written to Cloud Logging """ # The Pub/Sub event payload is passed as the CloudEvent's data payload. diff --git a/monitoring/api/v3/api-client/README.rst b/monitoring/api/v3/api-client/README.rst index b905644a9e8..52ac5ed9705 100644 --- a/monitoring/api/v3/api-client/README.rst +++ b/monitoring/api/v3/api-client/README.rst @@ -1,18 +1,18 @@ .. This file is automatically generated. Do not edit this file directly. -Stackdriver Monitoring Python Samples +Cloud Logging Monitoring Python Samples =============================================================================== .. image:: https://gstatic.com/cloudssh/images/open-btn.png :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/api-client/README.rst -This directory contains samples for Stackdriver Monitoring. `Stackdriver Monitoring `_ collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. Stackdriver ingests that data and generates insights via dashboards, charts, and alerts. +This directory contains samples for Cloud Logging Monitoring. `Cloud Logging Monitoring `_ collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. Cloud Logging ingests that data and generates insights via dashboards, charts, and alerts. -.. _Stackdriver Monitoring: https://cloud.google.com/monitoring/docs +.. _Cloud Logging Monitoring: https://cloud.google.com/monitoring/docs Setup ------------------------------------------------------------------------------- @@ -78,7 +78,7 @@ To run this sample: usage: list_resources.py [-h] --project_id PROJECT_ID - Sample command-line program for retrieving Stackdriver Monitoring API V3 + Sample command-line program for retrieving Cloud Logging Monitoring API V3 data. See README.md for instructions on setting up your development environment. @@ -111,7 +111,7 @@ To run this sample: usage: custom_metric.py [-h] --project_id PROJECT_ID - Sample command-line program for writing and reading Stackdriver Monitoring + Sample command-line program for writing and reading Cloud Logging Monitoring API V3 custom metrics. Simple command-line program to demonstrate connecting to the Google diff --git a/monitoring/api/v3/api-client/README.rst.in b/monitoring/api/v3/api-client/README.rst.in index e71bd6de87c..f0526bc0492 100644 --- a/monitoring/api/v3/api-client/README.rst.in +++ b/monitoring/api/v3/api-client/README.rst.in @@ -1,15 +1,15 @@ # This file is used to generate README.rst product: - name: Stackdriver Monitoring - short_name: Stackdriver Monitoring + name: Cloud Logging Monitoring + short_name: Cloud Logging Monitoring url: https://cloud.google.com/monitoring/docs description: > - `Stackdriver Monitoring `_ collects metrics, events, and metadata from + `Cloud Logging Monitoring `_ collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many - others. Stackdriver ingests that data and generates insights via + others. Cloud Logging ingests that data and generates insights via dashboards, charts, and alerts. setup: diff --git a/monitoring/api/v3/api-client/list_resources.py b/monitoring/api/v3/api-client/list_resources.py index e77e610314f..4b53110c389 100644 --- a/monitoring/api/v3/api-client/list_resources.py +++ b/monitoring/api/v3/api-client/list_resources.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Sample command-line program for retrieving Stackdriver Monitoring API V3 +"""Sample command-line program for retrieving Cloud Logging Monitoring API V3 data. See README.md for instructions on setting up your development environment. diff --git a/monitoring/snippets/v3/alerts-client/README.rst b/monitoring/snippets/v3/alerts-client/README.rst index bb59aad5fee..dcf1d9e8d82 100644 --- a/monitoring/snippets/v3/alerts-client/README.rst +++ b/monitoring/snippets/v3/alerts-client/README.rst @@ -1,18 +1,18 @@ .. This file is automatically generated. Do not edit this file directly. -Google Stackdriver Alerting API Python Samples +Google Cloud Logging Alerting API Python Samples =============================================================================== .. image:: https://gstatic.com/cloudssh/images/open-btn.png :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/alerts-client/README.rst -This directory contains samples for Google Stackdriver Alerting API. Stackdriver Monitoring collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. Stackdriver's Alerting API allows you to create, delete, and make back up copies of your alert policies. +This directory contains samples for Google Cloud Logging Alerting API. Cloud Logging Monitoring collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. Cloud Logging's Alerting API allows you to create, delete, and make back up copies of your alert policies. -.. _Google Stackdriver Alerting API: https://cloud.google.com/monitoring/alerts/ +.. _Google Cloud Logging Alerting API: https://cloud.google.com/monitoring/alerts/ To run the sample, you need to enable the API at: https://console.cloud.google.com/apis/library/monitoring.googleapis.com diff --git a/monitoring/snippets/v3/alerts-client/README.rst.in b/monitoring/snippets/v3/alerts-client/README.rst.in index 00b280124ea..e5d620aaacd 100644 --- a/monitoring/snippets/v3/alerts-client/README.rst.in +++ b/monitoring/snippets/v3/alerts-client/README.rst.in @@ -1,15 +1,15 @@ # This file is used to generate README.rst product: - name: Google Stackdriver Alerting API - short_name: Stackdriver Alerting API + name: Google Cloud Logging Alerting API + short_name: Cloud Logging Alerting API url: https://cloud.google.com/monitoring/alerts/ description: > - Stackdriver Monitoring collects metrics, events, and metadata from Google + Cloud Logging Monitoring collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch - and many others. Stackdriver's Alerting API allows you to create, + and many others. Cloud Logging's Alerting API allows you to create, delete, and make back up copies of your alert policies. required_api_url: https://console.cloud.google.com/apis/library/monitoring.googleapis.com diff --git a/monitoring/snippets/v3/cloud-client/README.rst b/monitoring/snippets/v3/cloud-client/README.rst index 280f9c4e0a7..d25ff94e9a6 100644 --- a/monitoring/snippets/v3/cloud-client/README.rst +++ b/monitoring/snippets/v3/cloud-client/README.rst @@ -1,20 +1,20 @@ .. This file is automatically generated. Do not edit this file directly. -Google Stackdriver Monitoring API Python Samples +Google Cloud Logging Monitoring API Python Samples =============================================================================== .. image:: https://gstatic.com/cloudssh/images/open-btn.png :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/cloud-client/README.rst -This directory contains samples for Google Stackdriver Monitoring API. Stackdriver Monitoring collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch - and many others. Stackdriver ingests that data and generates insights +This directory contains samples for Google Cloud Logging Monitoring API. Cloud Logging Monitoring collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch + and many others. Cloud Logging ingests that data and generates insights via dashboards, charts, and alerts. -.. _Google Stackdriver Monitoring API: https://cloud.google.com/monitoring/docs/ +.. _Google Cloud Logging Monitoring API: https://cloud.google.com/monitoring/docs/ To run the sample, you need to enable the API at: https://console.cloud.google.com/apis/library/monitoring.googleapis.com diff --git a/monitoring/snippets/v3/cloud-client/README.rst.in b/monitoring/snippets/v3/cloud-client/README.rst.in index 0ab6b2258b7..ca643978c8a 100644 --- a/monitoring/snippets/v3/cloud-client/README.rst.in +++ b/monitoring/snippets/v3/cloud-client/README.rst.in @@ -1,15 +1,15 @@ # This file is used to generate README.rst product: - name: Google Stackdriver Monitoring API - short_name: Stackdriver Monitoring API + name: Google Cloud Logging Monitoring API + short_name: Cloud Logging Monitoring API url: https://cloud.google.com/monitoring/docs/ description: > - Stackdriver Monitoring collects metrics, events, and metadata from Google + Cloud Logging Monitoring collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch - and many others. Stackdriver ingests that data and generates insights + and many others. Cloud Logging ingests that data and generates insights via dashboards, charts, and alerts. required_api_url: https://console.cloud.google.com/apis/library/monitoring.googleapis.com diff --git a/monitoring/snippets/v3/uptime-check-client/README.rst b/monitoring/snippets/v3/uptime-check-client/README.rst index 30046bdef9d..2b282ca8b84 100644 --- a/monitoring/snippets/v3/uptime-check-client/README.rst +++ b/monitoring/snippets/v3/uptime-check-client/README.rst @@ -1,18 +1,18 @@ .. This file is automatically generated. Do not edit this file directly. -Google Stackdriver Uptime Checks API Python Samples +Google Cloud Logging Uptime Checks API Python Samples =============================================================================== .. image:: https://gstatic.com/cloudssh/images/open-btn.png :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/uptime-check-client/README.rst -This directory contains samples for Google Stackdriver Uptime Checks API. Stackdriver Monitoring collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. Stackdriver's Uptime Checks API allows you to create, delete, and list your project's Uptime Checks. +This directory contains samples for Google Cloud Logging Uptime Checks API. Cloud Logging Monitoring collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. Cloud Logging's Uptime Checks API allows you to create, delete, and list your project's Uptime Checks. -.. _Google Stackdriver Uptime Checks API: https://cloud.google.com/monitoring/uptime-checks/management +.. _Google Cloud Logging Uptime Checks API: https://cloud.google.com/monitoring/uptime-checks/management Setup ------------------------------------------------------------------------------- diff --git a/monitoring/snippets/v3/uptime-check-client/README.rst.in b/monitoring/snippets/v3/uptime-check-client/README.rst.in index 1174962e48d..0521a4fe9c8 100644 --- a/monitoring/snippets/v3/uptime-check-client/README.rst.in +++ b/monitoring/snippets/v3/uptime-check-client/README.rst.in @@ -1,15 +1,15 @@ # This file is used to generate README.rst product: - name: Google Stackdriver Uptime Checks API - short_name: Stackdriver Uptime Checks API + name: Google Cloud Logging Uptime Checks API + short_name: Cloud Logging Uptime Checks API url: https://cloud.google.com/monitoring/uptime-checks/management description: > - Stackdriver Monitoring collects metrics, events, and metadata from Google + Cloud Logging Monitoring collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch - and many others. Stackdriver's Uptime Checks API allows you to create, + and many others. Cloud Logging's Uptime Checks API allows you to create, delete, and list your project's Uptime Checks. setup: diff --git a/pubsub/streaming-analytics/PubSubToGCS_test.py b/pubsub/streaming-analytics/PubSubToGCS_test.py index 35fd9fa5a89..8ce4e0bff2d 100644 --- a/pubsub/streaming-analytics/PubSubToGCS_test.py +++ b/pubsub/streaming-analytics/PubSubToGCS_test.py @@ -61,7 +61,7 @@ def test_pubsub_to_gcs(): # Check for output files on GCS. gcs_client = GcsIO() - files = gcs_client.list_prefix(f"gs://{BUCKET}/pubsub/{UUID}") + files = dict(gcs_client.list_files(f"gs://{BUCKET}/pubsub/{UUID}")) assert len(files) > 0 # Clean up. diff --git a/pubsub/streaming-analytics/README.md b/pubsub/streaming-analytics/README.md index 11706cf600b..f22a6ae5a2b 100644 --- a/pubsub/streaming-analytics/README.md +++ b/pubsub/streaming-analytics/README.md @@ -26,7 +26,7 @@ Sample(s) showing how to use [Google Cloud Pub/Sub] with [Google Cloud Dataflow] gcloud init ``` -1. [Enable the APIs](https://console.cloud.google.com/flows/enableapi?apiid=dataflow,compute_component,logging,storage_component,storage_api,pubsub,cloudresourcemanager.googleapis.com,cloudscheduler.googleapis.com,appengine.googleapis.com): Dataflow, Compute Engine, Stackdriver Logging, Cloud Storage, Cloud Storage JSON, Pub/Sub, Cloud Scheduler, Cloud Resource Manager, and App Engine. +1. [Enable the APIs](https://console.cloud.google.com/flows/enableapi?apiid=dataflow,compute_component,logging,storage_component,storage_api,pubsub,cloudresourcemanager.googleapis.com,cloudscheduler.googleapis.com,appengine.googleapis.com): Dataflow, Compute Engine, Cloud Logging, Cloud Storage, Cloud Storage JSON, Pub/Sub, Cloud Scheduler, Cloud Resource Manager, and App Engine. 1. Create a service account JSON key via the [*Create service account key* page], diff --git a/pubsub/streaming-analytics/noxfile_config.py b/pubsub/streaming-analytics/noxfile_config.py index 783945807ee..17b48115e0c 100644 --- a/pubsub/streaming-analytics/noxfile_config.py +++ b/pubsub/streaming-analytics/noxfile_config.py @@ -22,7 +22,7 @@ TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["2.7", "3.6", "3.9", "3.10", "3.11", "3.12", "3.13"], + "ignored_versions": ["2.7", "3.6", "3.7", "3.8", "3.9", "3.14"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": False, diff --git a/pubsub/streaming-analytics/requirements.txt b/pubsub/streaming-analytics/requirements.txt index 7dac644ad0f..44955c079c5 100644 --- a/pubsub/streaming-analytics/requirements.txt +++ b/pubsub/streaming-analytics/requirements.txt @@ -1 +1 @@ -apache-beam[gcp,test]==2.42.0 +apache-beam[gcp,test]==2.72.0 diff --git a/run/logging-manual/README.md b/run/logging-manual/README.md index 378cf44efbe..ed8945290dc 100644 --- a/run/logging-manual/README.md +++ b/run/logging-manual/README.md @@ -1,6 +1,6 @@ # Cloud Run Manual Logging Sample -This sample shows how to send structured logs to Stackdriver Logging. +This sample shows how to send structured logs to Cloud Logging. [![Run in Google Cloud][run_img]][run_link] diff --git a/run/logging-manual/e2e_test.py b/run/logging-manual/e2e_test.py index a2eed020216..80aef7455e2 100644 --- a/run/logging-manual/e2e_test.py +++ b/run/logging-manual/e2e_test.py @@ -169,8 +169,8 @@ def test_end_to_end(service_url_auth_token, deployed_service): assert response.status_code == 200 assert "Hello Logger!" in response.content.decode("UTF-8") - # Test that the logs are writing properly to stackdriver - time.sleep(10) # Slight delay writing to stackdriver + # Test that the logs are writing properly to Cloud Logging + time.sleep(10) # Slight delay writing to Cloud Logging client = LoggingServiceV2Client() resource_names = [f"projects/{PROJECT}"] # We add timestamp for making the query faster. @@ -184,7 +184,7 @@ def test_end_to_end(service_url_auth_token, deployed_service): "AND jsonPayload.component=arbitrary-property" ) - # Retry a maximum number of 10 times to find results in stackdriver + # Retry a maximum number of 10 times to find results in Cloud Logging found = False for x in range(10): iterator = client.list_log_entries( diff --git a/run/logging-manual/requirements-test.txt b/run/logging-manual/requirements-test.txt index 86ed56c0141..cae36808290 100644 --- a/run/logging-manual/requirements-test.txt +++ b/run/logging-manual/requirements-test.txt @@ -1,2 +1,2 @@ pytest==8.2.0 -google-cloud-logging==3.11.4 +google-cloud-logging==3.15.0 diff --git a/run/pubsub/e2e_test.py b/run/pubsub/e2e_test.py index 917657cd5da..3bb78a73566 100644 --- a/run/pubsub/e2e_test.py +++ b/run/pubsub/e2e_test.py @@ -233,7 +233,7 @@ def test_end_to_end(pubsub_topic): future.result() # Check the logs for "Hello Runner" - time.sleep(20) # Slight delay writing to stackdriver + time.sleep(20) # Slight delay writing to Cloud Logging client = LoggingServiceV2Client() resource_names = [f"projects/{PROJECT}"] @@ -246,7 +246,7 @@ def test_end_to_end(pubsub_topic): f"AND resource.labels.service_name={CLOUD_RUN_SERVICE} " ) - # Retry a maximum number of 10 times to find results in stackdriver + # Retry a maximum number of 10 times to find results in Cloud Logging found = False for x in range(10): iterator = client.list_log_entries( diff --git a/run/pubsub/requirements-test.txt b/run/pubsub/requirements-test.txt index 53e3abc66ec..305f4f14156 100644 --- a/run/pubsub/requirements-test.txt +++ b/run/pubsub/requirements-test.txt @@ -1,4 +1,4 @@ backoff==2.2.1 pytest==8.2.0 -google-cloud-logging==3.11.4 -google-cloud-pubsub==2.28.0 +google-cloud-logging==3.15.0 +google-cloud-pubsub==2.36.0 diff --git a/trace/trace-python-sample-opentelemetry/README.rst.in b/trace/trace-python-sample-opentelemetry/README.rst.in index 471ffa008eb..c97c06d71f3 100644 --- a/trace/trace-python-sample-opentelemetry/README.rst.in +++ b/trace/trace-python-sample-opentelemetry/README.rst.in @@ -1,11 +1,11 @@ # This file is used to generate README.rst product: - name: Stackdriver Trace - short_name: Stackdriver Trace + name: Cloud Trace + short_name: Cloud Trace url: https://cloud.google.com/trace/docs description: > - `Stackdriver Trace`_ collects latency data from applications and displays + `Cloud Trace`_ collects latency data from applications and displays it in near real time in the Google Cloud Platform Console. setup: