Class OpenCensusConfig

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, OpenCensusConfigOrBuilder, Serializable

    public final class OpenCensusConfig
    extends com.google.protobuf.GeneratedMessageV3
    implements OpenCensusConfigOrBuilder
     Configuration for the OpenCensus tracer.
     [#next-free-field: 15]
     [#extension: envoy.tracers.opencensus]
     
    Protobuf type envoy.config.trace.v3.OpenCensusConfig
    See Also:
    Serialized Form
    • Field Detail

      • TRACE_CONFIG_FIELD_NUMBER

        public static final int TRACE_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • STDOUT_EXPORTER_ENABLED_FIELD_NUMBER

        public static final int STDOUT_EXPORTER_ENABLED_FIELD_NUMBER
        See Also:
        Constant Field Values
      • STACKDRIVER_EXPORTER_ENABLED_FIELD_NUMBER

        public static final int STACKDRIVER_EXPORTER_ENABLED_FIELD_NUMBER
        See Also:
        Constant Field Values
      • STACKDRIVER_PROJECT_ID_FIELD_NUMBER

        public static final int STACKDRIVER_PROJECT_ID_FIELD_NUMBER
        See Also:
        Constant Field Values
      • STACKDRIVER_ADDRESS_FIELD_NUMBER

        public static final int STACKDRIVER_ADDRESS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • STACKDRIVER_GRPC_SERVICE_FIELD_NUMBER

        public static final int STACKDRIVER_GRPC_SERVICE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ZIPKIN_EXPORTER_ENABLED_FIELD_NUMBER

        public static final int ZIPKIN_EXPORTER_ENABLED_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ZIPKIN_URL_FIELD_NUMBER

        public static final int ZIPKIN_URL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • OCAGENT_EXPORTER_ENABLED_FIELD_NUMBER

        public static final int OCAGENT_EXPORTER_ENABLED_FIELD_NUMBER
        See Also:
        Constant Field Values
      • OCAGENT_ADDRESS_FIELD_NUMBER

        public static final int OCAGENT_ADDRESS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • OCAGENT_GRPC_SERVICE_FIELD_NUMBER

        public static final int OCAGENT_GRPC_SERVICE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • INCOMING_TRACE_CONTEXT_FIELD_NUMBER

        public static final int INCOMING_TRACE_CONTEXT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • OUTGOING_TRACE_CONTEXT_FIELD_NUMBER

        public static final int OUTGOING_TRACE_CONTEXT_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasTraceConfig

        public boolean hasTraceConfig()
         Configures tracing, e.g. the sampler, max number of annotations, etc.
         
        .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
        Specified by:
        hasTraceConfig in interface OpenCensusConfigOrBuilder
        Returns:
        Whether the traceConfig field is set.
      • getTraceConfig

        public TraceConfig getTraceConfig()
         Configures tracing, e.g. the sampler, max number of annotations, etc.
         
        .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
        Specified by:
        getTraceConfig in interface OpenCensusConfigOrBuilder
        Returns:
        The traceConfig.
      • getStdoutExporterEnabled

        public boolean getStdoutExporterEnabled()
         Enables the stdout exporter if set to true. This is intended for debugging
         purposes.
         
        bool stdout_exporter_enabled = 2;
        Specified by:
        getStdoutExporterEnabled in interface OpenCensusConfigOrBuilder
        Returns:
        The stdoutExporterEnabled.
      • getStackdriverExporterEnabled

        public boolean getStackdriverExporterEnabled()
         Enables the Stackdriver exporter if set to true. The project_id must also
         be set.
         
        bool stackdriver_exporter_enabled = 3;
        Specified by:
        getStackdriverExporterEnabled in interface OpenCensusConfigOrBuilder
        Returns:
        The stackdriverExporterEnabled.
      • getStackdriverProjectIdBytes

        public com.google.protobuf.ByteString getStackdriverProjectIdBytes()
         The Cloud project_id to use for Stackdriver tracing.
         
        string stackdriver_project_id = 4;
        Specified by:
        getStackdriverProjectIdBytes in interface OpenCensusConfigOrBuilder
        Returns:
        The bytes for stackdriverProjectId.
      • getStackdriverAddress

        public String getStackdriverAddress()
         (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
         
        string stackdriver_address = 10;
        Specified by:
        getStackdriverAddress in interface OpenCensusConfigOrBuilder
        Returns:
        The stackdriverAddress.
      • getStackdriverAddressBytes

        public com.google.protobuf.ByteString getStackdriverAddressBytes()
         (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
         
        string stackdriver_address = 10;
        Specified by:
        getStackdriverAddressBytes in interface OpenCensusConfigOrBuilder
        Returns:
        The bytes for stackdriverAddress.
      • hasStackdriverGrpcService

        public boolean hasStackdriverGrpcService()
         (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.
         
        .envoy.config.core.v3.GrpcService stackdriver_grpc_service = 13;
        Specified by:
        hasStackdriverGrpcService in interface OpenCensusConfigOrBuilder
        Returns:
        Whether the stackdriverGrpcService field is set.
      • getStackdriverGrpcService

        public GrpcService getStackdriverGrpcService()
         (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.
         
        .envoy.config.core.v3.GrpcService stackdriver_grpc_service = 13;
        Specified by:
        getStackdriverGrpcService in interface OpenCensusConfigOrBuilder
        Returns:
        The stackdriverGrpcService.
      • getStackdriverGrpcServiceOrBuilder

        public GrpcServiceOrBuilder getStackdriverGrpcServiceOrBuilder()
         (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.
         
        .envoy.config.core.v3.GrpcService stackdriver_grpc_service = 13;
        Specified by:
        getStackdriverGrpcServiceOrBuilder in interface OpenCensusConfigOrBuilder
      • getZipkinExporterEnabled

        @Deprecated
        public boolean getZipkinExporterEnabled()
        Deprecated.
        envoy.config.trace.v3.OpenCensusConfig.zipkin_exporter_enabled is deprecated. See envoy/config/trace/v3/opencensus.proto;l=77
         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>`.
         
        bool zipkin_exporter_enabled = 5 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
        Specified by:
        getZipkinExporterEnabled in interface OpenCensusConfigOrBuilder
        Returns:
        The zipkinExporterEnabled.
      • getZipkinUrl

        @Deprecated
        public String getZipkinUrl()
        Deprecated.
        envoy.config.trace.v3.OpenCensusConfig.zipkin_url is deprecated. See envoy/config/trace/v3/opencensus.proto;l=83
         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>`.
         
        string zipkin_url = 6 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
        Specified by:
        getZipkinUrl in interface OpenCensusConfigOrBuilder
        Returns:
        The zipkinUrl.
      • getZipkinUrlBytes

        @Deprecated
        public com.google.protobuf.ByteString getZipkinUrlBytes()
        Deprecated.
        envoy.config.trace.v3.OpenCensusConfig.zipkin_url is deprecated. See envoy/config/trace/v3/opencensus.proto;l=83
         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>`.
         
        string zipkin_url = 6 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];
        Specified by:
        getZipkinUrlBytes in interface OpenCensusConfigOrBuilder
        Returns:
        The bytes for zipkinUrl.
      • getOcagentExporterEnabled

        public boolean getOcagentExporterEnabled()
         Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
         ocagent_grpc_service must also be set.
         
        bool ocagent_exporter_enabled = 11;
        Specified by:
        getOcagentExporterEnabled in interface OpenCensusConfigOrBuilder
        Returns:
        The ocagentExporterEnabled.
      • getOcagentAddress

        public String getOcagentAddress()
         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]
         
        string ocagent_address = 12;
        Specified by:
        getOcagentAddress in interface OpenCensusConfigOrBuilder
        Returns:
        The ocagentAddress.
      • getOcagentAddressBytes

        public com.google.protobuf.ByteString getOcagentAddressBytes()
         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]
         
        string ocagent_address = 12;
        Specified by:
        getOcagentAddressBytes in interface OpenCensusConfigOrBuilder
        Returns:
        The bytes for ocagentAddress.
      • hasOcagentGrpcService

        public boolean hasOcagentGrpcService()
         (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.
         
        .envoy.config.core.v3.GrpcService ocagent_grpc_service = 14;
        Specified by:
        hasOcagentGrpcService in interface OpenCensusConfigOrBuilder
        Returns:
        Whether the ocagentGrpcService field is set.
      • getOcagentGrpcService

        public GrpcService getOcagentGrpcService()
         (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.
         
        .envoy.config.core.v3.GrpcService ocagent_grpc_service = 14;
        Specified by:
        getOcagentGrpcService in interface OpenCensusConfigOrBuilder
        Returns:
        The ocagentGrpcService.
      • getOcagentGrpcServiceOrBuilder

        public GrpcServiceOrBuilder getOcagentGrpcServiceOrBuilder()
         (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.
         
        .envoy.config.core.v3.GrpcService ocagent_grpc_service = 14;
        Specified by:
        getOcagentGrpcServiceOrBuilder in interface OpenCensusConfigOrBuilder
      • getIncomingTraceContextCount

        public int getIncomingTraceContextCount()
         List of incoming trace context headers we will accept. First one found
         wins.
         
        repeated .envoy.config.trace.v3.OpenCensusConfig.TraceContext incoming_trace_context = 8;
        Specified by:
        getIncomingTraceContextCount in interface OpenCensusConfigOrBuilder
        Returns:
        The count of incomingTraceContext.
      • getIncomingTraceContext

        public OpenCensusConfig.TraceContext getIncomingTraceContext​(int index)
         List of incoming trace context headers we will accept. First one found
         wins.
         
        repeated .envoy.config.trace.v3.OpenCensusConfig.TraceContext incoming_trace_context = 8;
        Specified by:
        getIncomingTraceContext in interface OpenCensusConfigOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The incomingTraceContext at the given index.
      • getIncomingTraceContextValueList

        public List<Integer> getIncomingTraceContextValueList()
         List of incoming trace context headers we will accept. First one found
         wins.
         
        repeated .envoy.config.trace.v3.OpenCensusConfig.TraceContext incoming_trace_context = 8;
        Specified by:
        getIncomingTraceContextValueList in interface OpenCensusConfigOrBuilder
        Returns:
        A list containing the enum numeric values on the wire for incomingTraceContext.
      • getIncomingTraceContextValue

        public int getIncomingTraceContextValue​(int index)
         List of incoming trace context headers we will accept. First one found
         wins.
         
        repeated .envoy.config.trace.v3.OpenCensusConfig.TraceContext incoming_trace_context = 8;
        Specified by:
        getIncomingTraceContextValue in interface OpenCensusConfigOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The enum numeric value on the wire of incomingTraceContext at the given index.
      • getOutgoingTraceContextCount

        public int getOutgoingTraceContextCount()
         List of outgoing trace context headers we will produce.
         
        repeated .envoy.config.trace.v3.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
        Specified by:
        getOutgoingTraceContextCount in interface OpenCensusConfigOrBuilder
        Returns:
        The count of outgoingTraceContext.
      • getOutgoingTraceContext

        public OpenCensusConfig.TraceContext getOutgoingTraceContext​(int index)
         List of outgoing trace context headers we will produce.
         
        repeated .envoy.config.trace.v3.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
        Specified by:
        getOutgoingTraceContext in interface OpenCensusConfigOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The outgoingTraceContext at the given index.
      • getOutgoingTraceContextValueList

        public List<Integer> getOutgoingTraceContextValueList()
         List of outgoing trace context headers we will produce.
         
        repeated .envoy.config.trace.v3.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
        Specified by:
        getOutgoingTraceContextValueList in interface OpenCensusConfigOrBuilder
        Returns:
        A list containing the enum numeric values on the wire for outgoingTraceContext.
      • getOutgoingTraceContextValue

        public int getOutgoingTraceContextValue​(int index)
         List of outgoing trace context headers we will produce.
         
        repeated .envoy.config.trace.v3.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
        Specified by:
        getOutgoingTraceContextValue in interface OpenCensusConfigOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The enum numeric value on the wire of outgoingTraceContext at the given index.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static OpenCensusConfig parseFrom​(ByteBuffer data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OpenCensusConfig parseFrom​(ByteBuffer data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OpenCensusConfig parseFrom​(com.google.protobuf.ByteString data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OpenCensusConfig parseFrom​(com.google.protobuf.ByteString data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OpenCensusConfig parseFrom​(byte[] data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OpenCensusConfig parseFrom​(byte[] data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static OpenCensusConfig parseFrom​(com.google.protobuf.CodedInputStream input,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws IOException
        Throws:
        IOException
      • newBuilderForType

        public OpenCensusConfig.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public OpenCensusConfig.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected OpenCensusConfig.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<OpenCensusConfig> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public OpenCensusConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder