Source File:


Configuration for the OpenCensus tracer.

The OpenCensus tracer is capable of reporting metadata to a collector using W3C-standard Trace Context: WARNING: users should take care to note that this plugin has a serious limitation that can cause a configuration freeze of Envoy’s dynamic listeners. This plugin can be initialised once after Envoy has started. In order to change this plugin’s configuration, users must first apply the new configuration, and then restart Envoy. Users should also be aware that once the new configuration is applied, Envoy will reject any changes to its dynamic listeners configuration until after it has been restarted. [#extension: envoy.tracers.opencensus]

"ocagentExporterEnabled": bool
"httpAddress": string
"incomingTraceContext": []
"outgoingTraceContext": []

Field Type Description
traceConfig Configuration of when to submit traces to the collector. See for full documentation.
ocagentExporterEnabled bool Enables the OpenCensus agent if set to true.
httpAddress string Send to upstream over http. Only one of httpAddress or grpcAddress can be set.
grpcAddress Send to upstream over GRPC. Only one of grpcAddress or httpAddress can be set.
incomingTraceContext [] List of incoming trace context headers to accept. First one found wins.
outgoingTraceContext [] List of outgoing trace context headers we will produce.


"targetUri": string
"statPrefix": string

Field Type Description
targetUri string URI of the target address.
statPrefix string Prefix for statistical measurements.


Name Description
NONE No-op default, no trace context is utilized.
TRACE_CONTEXT W3C Trace-Context format “traceparent:” header.
GRPC_TRACE_BIN Binary “grpc-trace-bin:” header.
CLOUD_TRACE_CONTEXT “X-Cloud-Trace-Context:” header.
B3 X-B3-* headers.


"maxNumberOfAttributes": int
"maxNumberOfAnnotations": int
"maxNumberOfMessageEvents": int
"maxNumberOfLinks": int

Field Type Description
probabilitySampler Only one of probabilitySampler, constantSampler, or rateLimitingSampler can be set.
constantSampler Only one of constantSampler, probabilitySampler, or rateLimitingSampler can be set.
rateLimitingSampler Only one of rateLimitingSampler, probabilitySampler, or constantSampler can be set.
maxNumberOfAttributes int The global default max number of attributes per span.
maxNumberOfAnnotations int The global default max number of annotation events per span.
maxNumberOfMessageEvents int The global default max number of message events per span.
maxNumberOfLinks int The global default max number of link entries per span.


Sampler that tries to uniformly sample traces with a given probability. The probability of sampling a trace is equal to that of the specified probability.

"samplingProbability": float

Field Type Description
samplingProbability float The desired probability of sampling. Must be within [0.0, 1.0].


Sampler that always makes a constant decision on span sampling.


Field Type Description


How spans should be sampled:

Name Description


Sampler that tries to sample with a rate per time window.

"qps": int

Field Type Description
qps int Rate per second.