io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/trace/v3/opentelemetry.proto
// Protobuf Java Version: 3.25.5
package io.envoyproxy.envoy.config.trace.v3;
/**
*
* Configuration for the OpenTelemetry tracer.
* [#extension: envoy.tracers.opentelemetry]
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.config.trace.v3.OpenTelemetryConfig}
*/
public final class OpenTelemetryConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.trace.v3.OpenTelemetryConfig)
OpenTelemetryConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use OpenTelemetryConfig.newBuilder() to construct.
private OpenTelemetryConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OpenTelemetryConfig() {
serviceName_ = "";
resourceDetectors_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new OpenTelemetryConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.trace.v3.OpentelemetryProto.internal_static_envoy_config_trace_v3_OpenTelemetryConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.trace.v3.OpentelemetryProto.internal_static_envoy_config_trace_v3_OpenTelemetryConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig.class, io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig.Builder.class);
}
private int bitField0_;
public static final int GRPC_SERVICE_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.config.core.v3.GrpcService grpcService_;
/**
*
* The upstream gRPC cluster that will receive OTLP traces.
* Note that the tracer drops traces if the server does not read data fast enough.
* This field can be left empty to disable reporting traces to the gRPC service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
*
* .envoy.config.core.v3.GrpcService grpc_service = 1 [(.udpa.annotations.field_migrate) = { ... }
* @return Whether the grpcService field is set.
*/
@java.lang.Override
public boolean hasGrpcService() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The upstream gRPC cluster that will receive OTLP traces.
* Note that the tracer drops traces if the server does not read data fast enough.
* This field can be left empty to disable reporting traces to the gRPC service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
*
* .envoy.config.core.v3.GrpcService grpc_service = 1 [(.udpa.annotations.field_migrate) = { ... }
* @return The grpcService.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.GrpcService getGrpcService() {
return grpcService_ == null ? io.envoyproxy.envoy.config.core.v3.GrpcService.getDefaultInstance() : grpcService_;
}
/**
*
* The upstream gRPC cluster that will receive OTLP traces.
* Note that the tracer drops traces if the server does not read data fast enough.
* This field can be left empty to disable reporting traces to the gRPC service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
*
* .envoy.config.core.v3.GrpcService grpc_service = 1 [(.udpa.annotations.field_migrate) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.GrpcServiceOrBuilder getGrpcServiceOrBuilder() {
return grpcService_ == null ? io.envoyproxy.envoy.config.core.v3.GrpcService.getDefaultInstance() : grpcService_;
}
public static final int HTTP_SERVICE_FIELD_NUMBER = 3;
private io.envoyproxy.envoy.config.core.v3.HttpService httpService_;
/**
*
* The upstream HTTP cluster that will receive OTLP traces.
* This field can be left empty to disable reporting traces to the HTTP service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
* .. note::
*
* Note: The ``request_headers_to_add`` property in the OTLP HTTP exporter service
* does not support the :ref:`format specifier <config_access_log_format>` as used for
* :ref:`HTTP access logging <config_access_log>`.
* The values configured are added as HTTP headers on the OTLP export request
* without any formatting applied.
*
*
* .envoy.config.core.v3.HttpService http_service = 3 [(.udpa.annotations.field_migrate) = { ... }
* @return Whether the httpService field is set.
*/
@java.lang.Override
public boolean hasHttpService() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The upstream HTTP cluster that will receive OTLP traces.
* This field can be left empty to disable reporting traces to the HTTP service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
* .. note::
*
* Note: The ``request_headers_to_add`` property in the OTLP HTTP exporter service
* does not support the :ref:`format specifier <config_access_log_format>` as used for
* :ref:`HTTP access logging <config_access_log>`.
* The values configured are added as HTTP headers on the OTLP export request
* without any formatting applied.
*
*
* .envoy.config.core.v3.HttpService http_service = 3 [(.udpa.annotations.field_migrate) = { ... }
* @return The httpService.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.HttpService getHttpService() {
return httpService_ == null ? io.envoyproxy.envoy.config.core.v3.HttpService.getDefaultInstance() : httpService_;
}
/**
*
* The upstream HTTP cluster that will receive OTLP traces.
* This field can be left empty to disable reporting traces to the HTTP service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
* .. note::
*
* Note: The ``request_headers_to_add`` property in the OTLP HTTP exporter service
* does not support the :ref:`format specifier <config_access_log_format>` as used for
* :ref:`HTTP access logging <config_access_log>`.
* The values configured are added as HTTP headers on the OTLP export request
* without any formatting applied.
*
*
* .envoy.config.core.v3.HttpService http_service = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.HttpServiceOrBuilder getHttpServiceOrBuilder() {
return httpService_ == null ? io.envoyproxy.envoy.config.core.v3.HttpService.getDefaultInstance() : httpService_;
}
public static final int SERVICE_NAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object serviceName_ = "";
/**
*
* The name for the service. This will be populated in the ResourceSpan Resource attributes.
* If it is not provided, it will default to "unknown_service:envoy".
*
*
* string service_name = 2;
* @return The serviceName.
*/
@java.lang.Override
public java.lang.String getServiceName() {
java.lang.Object ref = serviceName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
serviceName_ = s;
return s;
}
}
/**
*
* The name for the service. This will be populated in the ResourceSpan Resource attributes.
* If it is not provided, it will default to "unknown_service:envoy".
*
*
* string service_name = 2;
* @return The bytes for serviceName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getServiceNameBytes() {
java.lang.Object ref = serviceName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
serviceName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RESOURCE_DETECTORS_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List resourceDetectors_;
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
@java.lang.Override
public java.util.List getResourceDetectorsList() {
return resourceDetectors_;
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
@java.lang.Override
public java.util.List extends io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder>
getResourceDetectorsOrBuilderList() {
return resourceDetectors_;
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
@java.lang.Override
public int getResourceDetectorsCount() {
return resourceDetectors_.size();
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig getResourceDetectors(int index) {
return resourceDetectors_.get(index);
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder getResourceDetectorsOrBuilder(
int index) {
return resourceDetectors_.get(index);
}
public static final int SAMPLER_FIELD_NUMBER = 5;
private io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig sampler_;
/**
*
* Specifies the sampler to be used by the OpenTelemetry tracer.
* The configured sampler implements the Sampler interface defined by the OpenTelemetry specification.
* This field can be left empty. In this case, the default Envoy sampling decision is used.
*
* See: `OpenTelemetry sampler specification <https://opentelemetry.io/docs/specs/otel/trace/sdk/#sampler>`_
* [#extension-category: envoy.tracers.opentelemetry.samplers]
*
*
* .envoy.config.core.v3.TypedExtensionConfig sampler = 5;
* @return Whether the sampler field is set.
*/
@java.lang.Override
public boolean hasSampler() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Specifies the sampler to be used by the OpenTelemetry tracer.
* The configured sampler implements the Sampler interface defined by the OpenTelemetry specification.
* This field can be left empty. In this case, the default Envoy sampling decision is used.
*
* See: `OpenTelemetry sampler specification <https://opentelemetry.io/docs/specs/otel/trace/sdk/#sampler>`_
* [#extension-category: envoy.tracers.opentelemetry.samplers]
*
*
* .envoy.config.core.v3.TypedExtensionConfig sampler = 5;
* @return The sampler.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig getSampler() {
return sampler_ == null ? io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.getDefaultInstance() : sampler_;
}
/**
*
* Specifies the sampler to be used by the OpenTelemetry tracer.
* The configured sampler implements the Sampler interface defined by the OpenTelemetry specification.
* This field can be left empty. In this case, the default Envoy sampling decision is used.
*
* See: `OpenTelemetry sampler specification <https://opentelemetry.io/docs/specs/otel/trace/sdk/#sampler>`_
* [#extension-category: envoy.tracers.opentelemetry.samplers]
*
*
* .envoy.config.core.v3.TypedExtensionConfig sampler = 5;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder getSamplerOrBuilder() {
return sampler_ == null ? io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.getDefaultInstance() : sampler_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getGrpcService());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceName_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getHttpService());
}
for (int i = 0; i < resourceDetectors_.size(); i++) {
output.writeMessage(4, resourceDetectors_.get(i));
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(5, getSampler());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getGrpcService());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceName_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getHttpService());
}
for (int i = 0; i < resourceDetectors_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, resourceDetectors_.get(i));
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getSampler());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig other = (io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig) obj;
if (hasGrpcService() != other.hasGrpcService()) return false;
if (hasGrpcService()) {
if (!getGrpcService()
.equals(other.getGrpcService())) return false;
}
if (hasHttpService() != other.hasHttpService()) return false;
if (hasHttpService()) {
if (!getHttpService()
.equals(other.getHttpService())) return false;
}
if (!getServiceName()
.equals(other.getServiceName())) return false;
if (!getResourceDetectorsList()
.equals(other.getResourceDetectorsList())) return false;
if (hasSampler() != other.hasSampler()) return false;
if (hasSampler()) {
if (!getSampler()
.equals(other.getSampler())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasGrpcService()) {
hash = (37 * hash) + GRPC_SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getGrpcService().hashCode();
}
if (hasHttpService()) {
hash = (37 * hash) + HTTP_SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getHttpService().hashCode();
}
hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getServiceName().hashCode();
if (getResourceDetectorsCount() > 0) {
hash = (37 * hash) + RESOURCE_DETECTORS_FIELD_NUMBER;
hash = (53 * hash) + getResourceDetectorsList().hashCode();
}
if (hasSampler()) {
hash = (37 * hash) + SAMPLER_FIELD_NUMBER;
hash = (53 * hash) + getSampler().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Configuration for the OpenTelemetry tracer.
* [#extension: envoy.tracers.opentelemetry]
* [#next-free-field: 6]
*
*
* Protobuf type {@code envoy.config.trace.v3.OpenTelemetryConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.trace.v3.OpenTelemetryConfig)
io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.trace.v3.OpentelemetryProto.internal_static_envoy_config_trace_v3_OpenTelemetryConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.trace.v3.OpentelemetryProto.internal_static_envoy_config_trace_v3_OpenTelemetryConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig.class, io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getGrpcServiceFieldBuilder();
getHttpServiceFieldBuilder();
getResourceDetectorsFieldBuilder();
getSamplerFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
grpcService_ = null;
if (grpcServiceBuilder_ != null) {
grpcServiceBuilder_.dispose();
grpcServiceBuilder_ = null;
}
httpService_ = null;
if (httpServiceBuilder_ != null) {
httpServiceBuilder_.dispose();
httpServiceBuilder_ = null;
}
serviceName_ = "";
if (resourceDetectorsBuilder_ == null) {
resourceDetectors_ = java.util.Collections.emptyList();
} else {
resourceDetectors_ = null;
resourceDetectorsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
sampler_ = null;
if (samplerBuilder_ != null) {
samplerBuilder_.dispose();
samplerBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.trace.v3.OpentelemetryProto.internal_static_envoy_config_trace_v3_OpenTelemetryConfig_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig build() {
io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig buildPartial() {
io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig result = new io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig result) {
if (resourceDetectorsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
resourceDetectors_ = java.util.Collections.unmodifiableList(resourceDetectors_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.resourceDetectors_ = resourceDetectors_;
} else {
result.resourceDetectors_ = resourceDetectorsBuilder_.build();
}
}
private void buildPartial0(io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.grpcService_ = grpcServiceBuilder_ == null
? grpcService_
: grpcServiceBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.httpService_ = httpServiceBuilder_ == null
? httpService_
: httpServiceBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.serviceName_ = serviceName_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.sampler_ = samplerBuilder_ == null
? sampler_
: samplerBuilder_.build();
to_bitField0_ |= 0x00000004;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig) {
return mergeFrom((io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig other) {
if (other == io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig.getDefaultInstance()) return this;
if (other.hasGrpcService()) {
mergeGrpcService(other.getGrpcService());
}
if (other.hasHttpService()) {
mergeHttpService(other.getHttpService());
}
if (!other.getServiceName().isEmpty()) {
serviceName_ = other.serviceName_;
bitField0_ |= 0x00000004;
onChanged();
}
if (resourceDetectorsBuilder_ == null) {
if (!other.resourceDetectors_.isEmpty()) {
if (resourceDetectors_.isEmpty()) {
resourceDetectors_ = other.resourceDetectors_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureResourceDetectorsIsMutable();
resourceDetectors_.addAll(other.resourceDetectors_);
}
onChanged();
}
} else {
if (!other.resourceDetectors_.isEmpty()) {
if (resourceDetectorsBuilder_.isEmpty()) {
resourceDetectorsBuilder_.dispose();
resourceDetectorsBuilder_ = null;
resourceDetectors_ = other.resourceDetectors_;
bitField0_ = (bitField0_ & ~0x00000008);
resourceDetectorsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getResourceDetectorsFieldBuilder() : null;
} else {
resourceDetectorsBuilder_.addAllMessages(other.resourceDetectors_);
}
}
}
if (other.hasSampler()) {
mergeSampler(other.getSampler());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getGrpcServiceFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
serviceName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 18
case 26: {
input.readMessage(
getHttpServiceFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 26
case 34: {
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig m =
input.readMessage(
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.parser(),
extensionRegistry);
if (resourceDetectorsBuilder_ == null) {
ensureResourceDetectorsIsMutable();
resourceDetectors_.add(m);
} else {
resourceDetectorsBuilder_.addMessage(m);
}
break;
} // case 34
case 42: {
input.readMessage(
getSamplerFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private io.envoyproxy.envoy.config.core.v3.GrpcService grpcService_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.GrpcService, io.envoyproxy.envoy.config.core.v3.GrpcService.Builder, io.envoyproxy.envoy.config.core.v3.GrpcServiceOrBuilder> grpcServiceBuilder_;
/**
*
* The upstream gRPC cluster that will receive OTLP traces.
* Note that the tracer drops traces if the server does not read data fast enough.
* This field can be left empty to disable reporting traces to the gRPC service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
*
* .envoy.config.core.v3.GrpcService grpc_service = 1 [(.udpa.annotations.field_migrate) = { ... }
* @return Whether the grpcService field is set.
*/
public boolean hasGrpcService() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The upstream gRPC cluster that will receive OTLP traces.
* Note that the tracer drops traces if the server does not read data fast enough.
* This field can be left empty to disable reporting traces to the gRPC service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
*
* .envoy.config.core.v3.GrpcService grpc_service = 1 [(.udpa.annotations.field_migrate) = { ... }
* @return The grpcService.
*/
public io.envoyproxy.envoy.config.core.v3.GrpcService getGrpcService() {
if (grpcServiceBuilder_ == null) {
return grpcService_ == null ? io.envoyproxy.envoy.config.core.v3.GrpcService.getDefaultInstance() : grpcService_;
} else {
return grpcServiceBuilder_.getMessage();
}
}
/**
*
* The upstream gRPC cluster that will receive OTLP traces.
* Note that the tracer drops traces if the server does not read data fast enough.
* This field can be left empty to disable reporting traces to the gRPC service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
*
* .envoy.config.core.v3.GrpcService grpc_service = 1 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder setGrpcService(io.envoyproxy.envoy.config.core.v3.GrpcService value) {
if (grpcServiceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
grpcService_ = value;
} else {
grpcServiceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The upstream gRPC cluster that will receive OTLP traces.
* Note that the tracer drops traces if the server does not read data fast enough.
* This field can be left empty to disable reporting traces to the gRPC service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
*
* .envoy.config.core.v3.GrpcService grpc_service = 1 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder setGrpcService(
io.envoyproxy.envoy.config.core.v3.GrpcService.Builder builderForValue) {
if (grpcServiceBuilder_ == null) {
grpcService_ = builderForValue.build();
} else {
grpcServiceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The upstream gRPC cluster that will receive OTLP traces.
* Note that the tracer drops traces if the server does not read data fast enough.
* This field can be left empty to disable reporting traces to the gRPC service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
*
* .envoy.config.core.v3.GrpcService grpc_service = 1 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder mergeGrpcService(io.envoyproxy.envoy.config.core.v3.GrpcService value) {
if (grpcServiceBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
grpcService_ != null &&
grpcService_ != io.envoyproxy.envoy.config.core.v3.GrpcService.getDefaultInstance()) {
getGrpcServiceBuilder().mergeFrom(value);
} else {
grpcService_ = value;
}
} else {
grpcServiceBuilder_.mergeFrom(value);
}
if (grpcService_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* The upstream gRPC cluster that will receive OTLP traces.
* Note that the tracer drops traces if the server does not read data fast enough.
* This field can be left empty to disable reporting traces to the gRPC service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
*
* .envoy.config.core.v3.GrpcService grpc_service = 1 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder clearGrpcService() {
bitField0_ = (bitField0_ & ~0x00000001);
grpcService_ = null;
if (grpcServiceBuilder_ != null) {
grpcServiceBuilder_.dispose();
grpcServiceBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The upstream gRPC cluster that will receive OTLP traces.
* Note that the tracer drops traces if the server does not read data fast enough.
* This field can be left empty to disable reporting traces to the gRPC service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
*
* .envoy.config.core.v3.GrpcService grpc_service = 1 [(.udpa.annotations.field_migrate) = { ... }
*/
public io.envoyproxy.envoy.config.core.v3.GrpcService.Builder getGrpcServiceBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getGrpcServiceFieldBuilder().getBuilder();
}
/**
*
* The upstream gRPC cluster that will receive OTLP traces.
* Note that the tracer drops traces if the server does not read data fast enough.
* This field can be left empty to disable reporting traces to the gRPC service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
*
* .envoy.config.core.v3.GrpcService grpc_service = 1 [(.udpa.annotations.field_migrate) = { ... }
*/
public io.envoyproxy.envoy.config.core.v3.GrpcServiceOrBuilder getGrpcServiceOrBuilder() {
if (grpcServiceBuilder_ != null) {
return grpcServiceBuilder_.getMessageOrBuilder();
} else {
return grpcService_ == null ?
io.envoyproxy.envoy.config.core.v3.GrpcService.getDefaultInstance() : grpcService_;
}
}
/**
*
* The upstream gRPC cluster that will receive OTLP traces.
* Note that the tracer drops traces if the server does not read data fast enough.
* This field can be left empty to disable reporting traces to the gRPC service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
*
* .envoy.config.core.v3.GrpcService grpc_service = 1 [(.udpa.annotations.field_migrate) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.GrpcService, io.envoyproxy.envoy.config.core.v3.GrpcService.Builder, io.envoyproxy.envoy.config.core.v3.GrpcServiceOrBuilder>
getGrpcServiceFieldBuilder() {
if (grpcServiceBuilder_ == null) {
grpcServiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.GrpcService, io.envoyproxy.envoy.config.core.v3.GrpcService.Builder, io.envoyproxy.envoy.config.core.v3.GrpcServiceOrBuilder>(
getGrpcService(),
getParentForChildren(),
isClean());
grpcService_ = null;
}
return grpcServiceBuilder_;
}
private io.envoyproxy.envoy.config.core.v3.HttpService httpService_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.HttpService, io.envoyproxy.envoy.config.core.v3.HttpService.Builder, io.envoyproxy.envoy.config.core.v3.HttpServiceOrBuilder> httpServiceBuilder_;
/**
*
* The upstream HTTP cluster that will receive OTLP traces.
* This field can be left empty to disable reporting traces to the HTTP service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
* .. note::
*
* Note: The ``request_headers_to_add`` property in the OTLP HTTP exporter service
* does not support the :ref:`format specifier <config_access_log_format>` as used for
* :ref:`HTTP access logging <config_access_log>`.
* The values configured are added as HTTP headers on the OTLP export request
* without any formatting applied.
*
*
* .envoy.config.core.v3.HttpService http_service = 3 [(.udpa.annotations.field_migrate) = { ... }
* @return Whether the httpService field is set.
*/
public boolean hasHttpService() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The upstream HTTP cluster that will receive OTLP traces.
* This field can be left empty to disable reporting traces to the HTTP service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
* .. note::
*
* Note: The ``request_headers_to_add`` property in the OTLP HTTP exporter service
* does not support the :ref:`format specifier <config_access_log_format>` as used for
* :ref:`HTTP access logging <config_access_log>`.
* The values configured are added as HTTP headers on the OTLP export request
* without any formatting applied.
*
*
* .envoy.config.core.v3.HttpService http_service = 3 [(.udpa.annotations.field_migrate) = { ... }
* @return The httpService.
*/
public io.envoyproxy.envoy.config.core.v3.HttpService getHttpService() {
if (httpServiceBuilder_ == null) {
return httpService_ == null ? io.envoyproxy.envoy.config.core.v3.HttpService.getDefaultInstance() : httpService_;
} else {
return httpServiceBuilder_.getMessage();
}
}
/**
*
* The upstream HTTP cluster that will receive OTLP traces.
* This field can be left empty to disable reporting traces to the HTTP service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
* .. note::
*
* Note: The ``request_headers_to_add`` property in the OTLP HTTP exporter service
* does not support the :ref:`format specifier <config_access_log_format>` as used for
* :ref:`HTTP access logging <config_access_log>`.
* The values configured are added as HTTP headers on the OTLP export request
* without any formatting applied.
*
*
* .envoy.config.core.v3.HttpService http_service = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder setHttpService(io.envoyproxy.envoy.config.core.v3.HttpService value) {
if (httpServiceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
httpService_ = value;
} else {
httpServiceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The upstream HTTP cluster that will receive OTLP traces.
* This field can be left empty to disable reporting traces to the HTTP service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
* .. note::
*
* Note: The ``request_headers_to_add`` property in the OTLP HTTP exporter service
* does not support the :ref:`format specifier <config_access_log_format>` as used for
* :ref:`HTTP access logging <config_access_log>`.
* The values configured are added as HTTP headers on the OTLP export request
* without any formatting applied.
*
*
* .envoy.config.core.v3.HttpService http_service = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder setHttpService(
io.envoyproxy.envoy.config.core.v3.HttpService.Builder builderForValue) {
if (httpServiceBuilder_ == null) {
httpService_ = builderForValue.build();
} else {
httpServiceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The upstream HTTP cluster that will receive OTLP traces.
* This field can be left empty to disable reporting traces to the HTTP service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
* .. note::
*
* Note: The ``request_headers_to_add`` property in the OTLP HTTP exporter service
* does not support the :ref:`format specifier <config_access_log_format>` as used for
* :ref:`HTTP access logging <config_access_log>`.
* The values configured are added as HTTP headers on the OTLP export request
* without any formatting applied.
*
*
* .envoy.config.core.v3.HttpService http_service = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder mergeHttpService(io.envoyproxy.envoy.config.core.v3.HttpService value) {
if (httpServiceBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
httpService_ != null &&
httpService_ != io.envoyproxy.envoy.config.core.v3.HttpService.getDefaultInstance()) {
getHttpServiceBuilder().mergeFrom(value);
} else {
httpService_ = value;
}
} else {
httpServiceBuilder_.mergeFrom(value);
}
if (httpService_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* The upstream HTTP cluster that will receive OTLP traces.
* This field can be left empty to disable reporting traces to the HTTP service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
* .. note::
*
* Note: The ``request_headers_to_add`` property in the OTLP HTTP exporter service
* does not support the :ref:`format specifier <config_access_log_format>` as used for
* :ref:`HTTP access logging <config_access_log>`.
* The values configured are added as HTTP headers on the OTLP export request
* without any formatting applied.
*
*
* .envoy.config.core.v3.HttpService http_service = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
public Builder clearHttpService() {
bitField0_ = (bitField0_ & ~0x00000002);
httpService_ = null;
if (httpServiceBuilder_ != null) {
httpServiceBuilder_.dispose();
httpServiceBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The upstream HTTP cluster that will receive OTLP traces.
* This field can be left empty to disable reporting traces to the HTTP service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
* .. note::
*
* Note: The ``request_headers_to_add`` property in the OTLP HTTP exporter service
* does not support the :ref:`format specifier <config_access_log_format>` as used for
* :ref:`HTTP access logging <config_access_log>`.
* The values configured are added as HTTP headers on the OTLP export request
* without any formatting applied.
*
*
* .envoy.config.core.v3.HttpService http_service = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
public io.envoyproxy.envoy.config.core.v3.HttpService.Builder getHttpServiceBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getHttpServiceFieldBuilder().getBuilder();
}
/**
*
* The upstream HTTP cluster that will receive OTLP traces.
* This field can be left empty to disable reporting traces to the HTTP service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
* .. note::
*
* Note: The ``request_headers_to_add`` property in the OTLP HTTP exporter service
* does not support the :ref:`format specifier <config_access_log_format>` as used for
* :ref:`HTTP access logging <config_access_log>`.
* The values configured are added as HTTP headers on the OTLP export request
* without any formatting applied.
*
*
* .envoy.config.core.v3.HttpService http_service = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
public io.envoyproxy.envoy.config.core.v3.HttpServiceOrBuilder getHttpServiceOrBuilder() {
if (httpServiceBuilder_ != null) {
return httpServiceBuilder_.getMessageOrBuilder();
} else {
return httpService_ == null ?
io.envoyproxy.envoy.config.core.v3.HttpService.getDefaultInstance() : httpService_;
}
}
/**
*
* The upstream HTTP cluster that will receive OTLP traces.
* This field can be left empty to disable reporting traces to the HTTP service.
* Only one of ``grpc_service``, ``http_service`` may be used.
*
* .. note::
*
* Note: The ``request_headers_to_add`` property in the OTLP HTTP exporter service
* does not support the :ref:`format specifier <config_access_log_format>` as used for
* :ref:`HTTP access logging <config_access_log>`.
* The values configured are added as HTTP headers on the OTLP export request
* without any formatting applied.
*
*
* .envoy.config.core.v3.HttpService http_service = 3 [(.udpa.annotations.field_migrate) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.HttpService, io.envoyproxy.envoy.config.core.v3.HttpService.Builder, io.envoyproxy.envoy.config.core.v3.HttpServiceOrBuilder>
getHttpServiceFieldBuilder() {
if (httpServiceBuilder_ == null) {
httpServiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.HttpService, io.envoyproxy.envoy.config.core.v3.HttpService.Builder, io.envoyproxy.envoy.config.core.v3.HttpServiceOrBuilder>(
getHttpService(),
getParentForChildren(),
isClean());
httpService_ = null;
}
return httpServiceBuilder_;
}
private java.lang.Object serviceName_ = "";
/**
*
* The name for the service. This will be populated in the ResourceSpan Resource attributes.
* If it is not provided, it will default to "unknown_service:envoy".
*
*
* string service_name = 2;
* @return The serviceName.
*/
public java.lang.String getServiceName() {
java.lang.Object ref = serviceName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
serviceName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The name for the service. This will be populated in the ResourceSpan Resource attributes.
* If it is not provided, it will default to "unknown_service:envoy".
*
*
* string service_name = 2;
* @return The bytes for serviceName.
*/
public com.google.protobuf.ByteString
getServiceNameBytes() {
java.lang.Object ref = serviceName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
serviceName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The name for the service. This will be populated in the ResourceSpan Resource attributes.
* If it is not provided, it will default to "unknown_service:envoy".
*
*
* string service_name = 2;
* @param value The serviceName to set.
* @return This builder for chaining.
*/
public Builder setServiceName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
serviceName_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The name for the service. This will be populated in the ResourceSpan Resource attributes.
* If it is not provided, it will default to "unknown_service:envoy".
*
*
* string service_name = 2;
* @return This builder for chaining.
*/
public Builder clearServiceName() {
serviceName_ = getDefaultInstance().getServiceName();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* The name for the service. This will be populated in the ResourceSpan Resource attributes.
* If it is not provided, it will default to "unknown_service:envoy".
*
*
* string service_name = 2;
* @param value The bytes for serviceName to set.
* @return This builder for chaining.
*/
public Builder setServiceNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
serviceName_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.util.List resourceDetectors_ =
java.util.Collections.emptyList();
private void ensureResourceDetectorsIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
resourceDetectors_ = new java.util.ArrayList(resourceDetectors_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder> resourceDetectorsBuilder_;
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public java.util.List getResourceDetectorsList() {
if (resourceDetectorsBuilder_ == null) {
return java.util.Collections.unmodifiableList(resourceDetectors_);
} else {
return resourceDetectorsBuilder_.getMessageList();
}
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public int getResourceDetectorsCount() {
if (resourceDetectorsBuilder_ == null) {
return resourceDetectors_.size();
} else {
return resourceDetectorsBuilder_.getCount();
}
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig getResourceDetectors(int index) {
if (resourceDetectorsBuilder_ == null) {
return resourceDetectors_.get(index);
} else {
return resourceDetectorsBuilder_.getMessage(index);
}
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public Builder setResourceDetectors(
int index, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig value) {
if (resourceDetectorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResourceDetectorsIsMutable();
resourceDetectors_.set(index, value);
onChanged();
} else {
resourceDetectorsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public Builder setResourceDetectors(
int index, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder builderForValue) {
if (resourceDetectorsBuilder_ == null) {
ensureResourceDetectorsIsMutable();
resourceDetectors_.set(index, builderForValue.build());
onChanged();
} else {
resourceDetectorsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public Builder addResourceDetectors(io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig value) {
if (resourceDetectorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResourceDetectorsIsMutable();
resourceDetectors_.add(value);
onChanged();
} else {
resourceDetectorsBuilder_.addMessage(value);
}
return this;
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public Builder addResourceDetectors(
int index, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig value) {
if (resourceDetectorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureResourceDetectorsIsMutable();
resourceDetectors_.add(index, value);
onChanged();
} else {
resourceDetectorsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public Builder addResourceDetectors(
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder builderForValue) {
if (resourceDetectorsBuilder_ == null) {
ensureResourceDetectorsIsMutable();
resourceDetectors_.add(builderForValue.build());
onChanged();
} else {
resourceDetectorsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public Builder addResourceDetectors(
int index, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder builderForValue) {
if (resourceDetectorsBuilder_ == null) {
ensureResourceDetectorsIsMutable();
resourceDetectors_.add(index, builderForValue.build());
onChanged();
} else {
resourceDetectorsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public Builder addAllResourceDetectors(
java.lang.Iterable extends io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig> values) {
if (resourceDetectorsBuilder_ == null) {
ensureResourceDetectorsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, resourceDetectors_);
onChanged();
} else {
resourceDetectorsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public Builder clearResourceDetectors() {
if (resourceDetectorsBuilder_ == null) {
resourceDetectors_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
resourceDetectorsBuilder_.clear();
}
return this;
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public Builder removeResourceDetectors(int index) {
if (resourceDetectorsBuilder_ == null) {
ensureResourceDetectorsIsMutable();
resourceDetectors_.remove(index);
onChanged();
} else {
resourceDetectorsBuilder_.remove(index);
}
return this;
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder getResourceDetectorsBuilder(
int index) {
return getResourceDetectorsFieldBuilder().getBuilder(index);
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder getResourceDetectorsOrBuilder(
int index) {
if (resourceDetectorsBuilder_ == null) {
return resourceDetectors_.get(index); } else {
return resourceDetectorsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public java.util.List extends io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder>
getResourceDetectorsOrBuilderList() {
if (resourceDetectorsBuilder_ != null) {
return resourceDetectorsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(resourceDetectors_);
}
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder addResourceDetectorsBuilder() {
return getResourceDetectorsFieldBuilder().addBuilder(
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.getDefaultInstance());
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder addResourceDetectorsBuilder(
int index) {
return getResourceDetectorsFieldBuilder().addBuilder(
index, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.getDefaultInstance());
}
/**
*
* An ordered list of resource detectors
* [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
*
*
* repeated .envoy.config.core.v3.TypedExtensionConfig resource_detectors = 4;
*/
public java.util.List
getResourceDetectorsBuilderList() {
return getResourceDetectorsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder>
getResourceDetectorsFieldBuilder() {
if (resourceDetectorsBuilder_ == null) {
resourceDetectorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder>(
resourceDetectors_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
resourceDetectors_ = null;
}
return resourceDetectorsBuilder_;
}
private io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig sampler_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder> samplerBuilder_;
/**
*
* Specifies the sampler to be used by the OpenTelemetry tracer.
* The configured sampler implements the Sampler interface defined by the OpenTelemetry specification.
* This field can be left empty. In this case, the default Envoy sampling decision is used.
*
* See: `OpenTelemetry sampler specification <https://opentelemetry.io/docs/specs/otel/trace/sdk/#sampler>`_
* [#extension-category: envoy.tracers.opentelemetry.samplers]
*
*
* .envoy.config.core.v3.TypedExtensionConfig sampler = 5;
* @return Whether the sampler field is set.
*/
public boolean hasSampler() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Specifies the sampler to be used by the OpenTelemetry tracer.
* The configured sampler implements the Sampler interface defined by the OpenTelemetry specification.
* This field can be left empty. In this case, the default Envoy sampling decision is used.
*
* See: `OpenTelemetry sampler specification <https://opentelemetry.io/docs/specs/otel/trace/sdk/#sampler>`_
* [#extension-category: envoy.tracers.opentelemetry.samplers]
*
*
* .envoy.config.core.v3.TypedExtensionConfig sampler = 5;
* @return The sampler.
*/
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig getSampler() {
if (samplerBuilder_ == null) {
return sampler_ == null ? io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.getDefaultInstance() : sampler_;
} else {
return samplerBuilder_.getMessage();
}
}
/**
*
* Specifies the sampler to be used by the OpenTelemetry tracer.
* The configured sampler implements the Sampler interface defined by the OpenTelemetry specification.
* This field can be left empty. In this case, the default Envoy sampling decision is used.
*
* See: `OpenTelemetry sampler specification <https://opentelemetry.io/docs/specs/otel/trace/sdk/#sampler>`_
* [#extension-category: envoy.tracers.opentelemetry.samplers]
*
*
* .envoy.config.core.v3.TypedExtensionConfig sampler = 5;
*/
public Builder setSampler(io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig value) {
if (samplerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sampler_ = value;
} else {
samplerBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Specifies the sampler to be used by the OpenTelemetry tracer.
* The configured sampler implements the Sampler interface defined by the OpenTelemetry specification.
* This field can be left empty. In this case, the default Envoy sampling decision is used.
*
* See: `OpenTelemetry sampler specification <https://opentelemetry.io/docs/specs/otel/trace/sdk/#sampler>`_
* [#extension-category: envoy.tracers.opentelemetry.samplers]
*
*
* .envoy.config.core.v3.TypedExtensionConfig sampler = 5;
*/
public Builder setSampler(
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder builderForValue) {
if (samplerBuilder_ == null) {
sampler_ = builderForValue.build();
} else {
samplerBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Specifies the sampler to be used by the OpenTelemetry tracer.
* The configured sampler implements the Sampler interface defined by the OpenTelemetry specification.
* This field can be left empty. In this case, the default Envoy sampling decision is used.
*
* See: `OpenTelemetry sampler specification <https://opentelemetry.io/docs/specs/otel/trace/sdk/#sampler>`_
* [#extension-category: envoy.tracers.opentelemetry.samplers]
*
*
* .envoy.config.core.v3.TypedExtensionConfig sampler = 5;
*/
public Builder mergeSampler(io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig value) {
if (samplerBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
sampler_ != null &&
sampler_ != io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.getDefaultInstance()) {
getSamplerBuilder().mergeFrom(value);
} else {
sampler_ = value;
}
} else {
samplerBuilder_.mergeFrom(value);
}
if (sampler_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
* Specifies the sampler to be used by the OpenTelemetry tracer.
* The configured sampler implements the Sampler interface defined by the OpenTelemetry specification.
* This field can be left empty. In this case, the default Envoy sampling decision is used.
*
* See: `OpenTelemetry sampler specification <https://opentelemetry.io/docs/specs/otel/trace/sdk/#sampler>`_
* [#extension-category: envoy.tracers.opentelemetry.samplers]
*
*
* .envoy.config.core.v3.TypedExtensionConfig sampler = 5;
*/
public Builder clearSampler() {
bitField0_ = (bitField0_ & ~0x00000010);
sampler_ = null;
if (samplerBuilder_ != null) {
samplerBuilder_.dispose();
samplerBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Specifies the sampler to be used by the OpenTelemetry tracer.
* The configured sampler implements the Sampler interface defined by the OpenTelemetry specification.
* This field can be left empty. In this case, the default Envoy sampling decision is used.
*
* See: `OpenTelemetry sampler specification <https://opentelemetry.io/docs/specs/otel/trace/sdk/#sampler>`_
* [#extension-category: envoy.tracers.opentelemetry.samplers]
*
*
* .envoy.config.core.v3.TypedExtensionConfig sampler = 5;
*/
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder getSamplerBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getSamplerFieldBuilder().getBuilder();
}
/**
*
* Specifies the sampler to be used by the OpenTelemetry tracer.
* The configured sampler implements the Sampler interface defined by the OpenTelemetry specification.
* This field can be left empty. In this case, the default Envoy sampling decision is used.
*
* See: `OpenTelemetry sampler specification <https://opentelemetry.io/docs/specs/otel/trace/sdk/#sampler>`_
* [#extension-category: envoy.tracers.opentelemetry.samplers]
*
*
* .envoy.config.core.v3.TypedExtensionConfig sampler = 5;
*/
public io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder getSamplerOrBuilder() {
if (samplerBuilder_ != null) {
return samplerBuilder_.getMessageOrBuilder();
} else {
return sampler_ == null ?
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.getDefaultInstance() : sampler_;
}
}
/**
*
* Specifies the sampler to be used by the OpenTelemetry tracer.
* The configured sampler implements the Sampler interface defined by the OpenTelemetry specification.
* This field can be left empty. In this case, the default Envoy sampling decision is used.
*
* See: `OpenTelemetry sampler specification <https://opentelemetry.io/docs/specs/otel/trace/sdk/#sampler>`_
* [#extension-category: envoy.tracers.opentelemetry.samplers]
*
*
* .envoy.config.core.v3.TypedExtensionConfig sampler = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder>
getSamplerFieldBuilder() {
if (samplerBuilder_ == null) {
samplerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfig.Builder, io.envoyproxy.envoy.config.core.v3.TypedExtensionConfigOrBuilder>(
getSampler(),
getParentForChildren(),
isClean());
sampler_ = null;
}
return samplerBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.trace.v3.OpenTelemetryConfig)
}
// @@protoc_insertion_point(class_scope:envoy.config.trace.v3.OpenTelemetryConfig)
private static final io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig();
}
public static io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OpenTelemetryConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.envoyproxy.envoy.config.trace.v3.OpenTelemetryConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy