vercelgoogle-cloud-logging

What is an approriate Monitored Resource Type in Google Cloud for logs coming from vercel?


I have set up a log drain in my Vercel app that points to an HTTP endpoint that inserts log records into Google Cloud Logging. When I do this, I must select a monitored resource for each log entry. Based on this page it seems that I must select from one of:

aws_ec2_instance: Amazon EC2 instance.
dataflow_job: Dataflow job.
gae_instance: App Engine instance.
gce_instance: Compute Engine instance.
generic_node: User-specified computing node.
generic_task: User-defined task.
gke_container: GKE container instance.
global: Use this resource when no other resource type is suitable. For most use cases, generic_node or generic_task are better choices than global.
k8s_cluster: Kubernetes cluster.
k8s_container: Kubernetes container.
k8s_node: Kubernetes node.
k8s_pod: Kubernetes pod.

These log entries are generated in response to HTTP requests to my vercel app. Would "generic task" then be the most appropriate one? Or perhaps "global"?


Solution

  • As per the DazWilkin Comment I also recommend you to use the generic_task resource type.

    Because as per this Document it is mentioned that

    when writing log entries, MonitoredResourceDescriptor.type has to be one of the types listed below. It isn't possible to create your own monitored resource types as these are created by Google Cloud. For non-Google Cloud resources, we recommend you can use the generic types generic_node or generic_task.

    Generic Task : A generic task identifies an application process for which no more specific resource is applicable, such as a process scheduled by a custom orchestration system. The label values must uniquely identify the task.