Services for performance metrics tracking¶
This Terraform module creates and configures Pub/Sub and BigQuery services to facilitate the tracking of performance metrics during load testing. Load generation tools like Locust can be seamlessly integrated with the metrics tracking services by publishing Pub/Sub messages conforming to the message schema configured by the module. The content of these messages is stored and managed in BigQuery for subsequent reporting and analysis.
Examples¶
module "locust-tracking" {
source = "github.com/GoogleCloudPlatform/applied-ai-engineering-samples//ai-infrastructure/terraform-modules/metrics-tracking
project_id = "project_id"
pubsub_config = {
topic_name = "locust_pubsub_sink"
subscription_name = "locust_metrics_bq_subscription"
schema_name = "locust_metrics_schema"
}
bq_config = {
dataset_name = "locust_metrics_dataset"
location = "US"
table_name = "locust_metrics_table"
}
}
Variables¶
Name | Description | Type | Required | Default |
---|---|---|---|---|
project_id | Project ID | string |
✓ | |
deletion_protection | Prevent Terraform from destroying data storage Pubsub and BigQuery resources). When this field is set, a terraform destroy or terraform apply that would delete data storage resources will fail. | string |
true |
|
pubsub_config | Pubsub configuration settings | object({...}) |
✓ | |
bq_config | Bigquery configuration settings | object({...}) |
✓ |
Outputs¶
Name | Description |
---|---|
performance_metrics_dataset_id | The ID of a BigQuery dataset |
performance_metrics_table_id | The ID of a BigQuery table |
perforamance_metrics_topic_name | The fully qualified name of the Pubsub topic |
performance_metrics_bq_subscription | The fully qualified name of the Pubsub BigQuery subscription |