Modify Cloud Trace Sampling Rate for Cloud Run

108 views Asked by At

I am running NodeJS code in Cloud Run, via Firebase functions (v2). I am tracing my functions using OpenTelemetry and exporting to Cloud Trace.

I understand from the documentation here

Cloud Run doesn't sample the traces for every request. When used with Cloud Run, requests are sampled at a maximum rate of 0.1 requests per second for each instance. You can also force a particular request to be traced.

Some of my Cloud Run services are called significantly more than others. So I'd like to sample requests to infrequently called services at a much higher rate than those that get many requests per second. I am happy with maximum sampling rate being 0.1, I am asking specifically in the range 0 <= sample rate <= 0.1.

How can I (if possible) modify this sample rate on a per-service basis?

0

There are 0 answers