pub struct OpenCensusConfig {Show 13 fields
pub trace_config: Option<TraceConfig>,
pub stdout_exporter_enabled: bool,
pub stackdriver_exporter_enabled: bool,
pub stackdriver_project_id: String,
pub stackdriver_address: String,
pub stackdriver_grpc_service: Option<GrpcService>,
pub zipkin_exporter_enabled: bool,
pub zipkin_url: String,
pub ocagent_exporter_enabled: bool,
pub ocagent_address: String,
pub ocagent_grpc_service: Option<GrpcService>,
pub incoming_trace_context: Vec<i32>,
pub outgoing_trace_context: Vec<i32>,
}
Expand description
Configuration for the OpenCensus tracer. [#next-free-field: 15] [#extension: envoy.tracers.opencensus]
Fields§
§trace_config: Option<TraceConfig>
Configures tracing, e.g. the sampler, max number of annotations, etc.
stdout_exporter_enabled: bool
Enables the stdout exporter if set to true. This is intended for debugging purposes.
stackdriver_exporter_enabled: bool
Enables the Stackdriver exporter if set to true. The project_id must also be set.
stackdriver_project_id: String
The Cloud project_id to use for Stackdriver tracing.
stackdriver_address: String
(optional) By default, the Stackdriver exporter will connect to production Stackdriver. If stackdriver_address is non-empty, it will instead connect to this address, which is in the gRPC format: https://github.com/grpc/grpc/blob/master/doc/naming.md
stackdriver_grpc_service: Option<GrpcService>
(optional) The gRPC server that hosts Stackdriver tracing service. Only
Google gRPC is supported. If :ref:target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>
is not provided, the default production Stackdriver address will be used.
zipkin_exporter_enabled: bool
Enables the Zipkin exporter if set to true. The url and service name must
also be set. This is deprecated, prefer to use Envoy’s :ref:native Zipkin tracer <envoy_v3_api_msg_config.trace.v3.ZipkinConfig>
.
zipkin_url: String
The URL to Zipkin, e.g. “http://127.0.0.1:9411/api/v2/spans". This is
deprecated, prefer to use Envoy’s :ref:native Zipkin tracer <envoy_v3_api_msg_config.trace.v3.ZipkinConfig>
.
ocagent_exporter_enabled: bool
Enables the OpenCensus Agent exporter if set to true. The ocagent_address or ocagent_grpc_service must also be set.
ocagent_address: String
The address of the OpenCensus Agent, if its exporter is enabled, in gRPC format: https://github.com/grpc/grpc/blob/master/doc/naming.md [#comment:TODO: deprecate this field]
ocagent_grpc_service: Option<GrpcService>
(optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported. This is only used if the ocagent_address is left empty.
incoming_trace_context: Vec<i32>
List of incoming trace context headers we will accept. First one found wins.
outgoing_trace_context: Vec<i32>
List of outgoing trace context headers we will produce.
Implementations§
Source§impl OpenCensusConfig
impl OpenCensusConfig
Sourcepub fn incoming_trace_context(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<TraceContext>>
pub fn incoming_trace_context( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<TraceContext>>
Returns an iterator which yields the valid enum values contained in incoming_trace_context
.
Sourcepub fn push_incoming_trace_context(&mut self, value: TraceContext)
pub fn push_incoming_trace_context(&mut self, value: TraceContext)
Appends the provided enum value to incoming_trace_context
.
Sourcepub fn outgoing_trace_context(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<TraceContext>>
pub fn outgoing_trace_context( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<TraceContext>>
Returns an iterator which yields the valid enum values contained in outgoing_trace_context
.
Sourcepub fn push_outgoing_trace_context(&mut self, value: TraceContext)
pub fn push_outgoing_trace_context(&mut self, value: TraceContext)
Appends the provided enum value to outgoing_trace_context
.
Trait Implementations§
Source§impl Clone for OpenCensusConfig
impl Clone for OpenCensusConfig
Source§fn clone(&self) -> OpenCensusConfig
fn clone(&self) -> OpenCensusConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OpenCensusConfig
impl Debug for OpenCensusConfig
Source§impl Default for OpenCensusConfig
impl Default for OpenCensusConfig
Source§impl Message for OpenCensusConfig
impl Message for OpenCensusConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl Name for OpenCensusConfig
impl Name for OpenCensusConfig
Source§const NAME: &'static str = "OpenCensusConfig"
const NAME: &'static str = "OpenCensusConfig"
Message
.
This name is the same as it appears in the source .proto file, e.g. FooBar
.Source§const PACKAGE: &'static str = "envoy.config.trace.v3"
const PACKAGE: &'static str = "envoy.config.trace.v3"
.
, e.g. google.protobuf
.Source§fn full_name() -> String
fn full_name() -> String
Message
.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation
.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.Source§impl PartialEq for OpenCensusConfig
impl PartialEq for OpenCensusConfig
impl StructuralPartialEq for OpenCensusConfig
Auto Trait Implementations§
impl Freeze for OpenCensusConfig
impl RefUnwindSafe for OpenCensusConfig
impl Send for OpenCensusConfig
impl Sync for OpenCensusConfig
impl Unpin for OpenCensusConfig
impl UnwindSafe for OpenCensusConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request