Package io.opentelemetry.proto.trace.v1
Class ResourceSpans.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<ResourceSpans,ResourceSpans.Builder>
io.opentelemetry.proto.trace.v1.ResourceSpans.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,ResourceSpansOrBuilder,Cloneable
- Enclosing class:
- ResourceSpans
public static final class ResourceSpans.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<ResourceSpans,ResourceSpans.Builder>
implements ResourceSpansOrBuilder
A collection of ScopeSpans from a Resource.Protobuf type
opentelemetry.proto.trace.v1.ResourceSpans-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionaddAllScopeSpans(Iterable<? extends ScopeSpans> values) A list of ScopeSpans that originate from a resource.addScopeSpans(int index, ScopeSpans value) A list of ScopeSpans that originate from a resource.addScopeSpans(int index, ScopeSpans.Builder builderForValue) A list of ScopeSpans that originate from a resource.addScopeSpans(ScopeSpans value) A list of ScopeSpans that originate from a resource.addScopeSpans(ScopeSpans.Builder builderForValue) A list of ScopeSpans that originate from a resource.The resource for the spans in this message.The Schema URL, if known.A list of ScopeSpans that originate from a resource.The resource for the spans in this message.The Schema URL, if known.com.google.protobuf.ByteStringThe Schema URL, if known.getScopeSpans(int index) A list of ScopeSpans that originate from a resource.intA list of ScopeSpans that originate from a resource.A list of ScopeSpans that originate from a resource.booleanThe resource for the spans in this message.mergeResource(Resource value) The resource for the spans in this message.removeScopeSpans(int index) A list of ScopeSpans that originate from a resource.setResource(Resource value) The resource for the spans in this message.setResource(Resource.Builder builderForValue) The resource for the spans in this message.setSchemaUrl(String value) The Schema URL, if known.setSchemaUrlBytes(com.google.protobuf.ByteString value) The Schema URL, if known.setScopeSpans(int index, ScopeSpans value) A list of ScopeSpans that originate from a resource.setScopeSpans(int index, ScopeSpans.Builder builderForValue) A list of ScopeSpans that originate from a resource.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
hasResource
public boolean hasResource()The resource for the spans in this message. If this field is not set then no resource info is known.
.opentelemetry.proto.resource.v1.Resource resource = 1 [json_name = "resource"];- Specified by:
hasResourcein interfaceResourceSpansOrBuilder- Returns:
- Whether the resource field is set.
-
getResource
The resource for the spans in this message. If this field is not set then no resource info is known.
.opentelemetry.proto.resource.v1.Resource resource = 1 [json_name = "resource"];- Specified by:
getResourcein interfaceResourceSpansOrBuilder- Returns:
- The resource.
-
setResource
The resource for the spans in this message. If this field is not set then no resource info is known.
.opentelemetry.proto.resource.v1.Resource resource = 1 [json_name = "resource"]; -
setResource
The resource for the spans in this message. If this field is not set then no resource info is known.
.opentelemetry.proto.resource.v1.Resource resource = 1 [json_name = "resource"]; -
mergeResource
The resource for the spans in this message. If this field is not set then no resource info is known.
.opentelemetry.proto.resource.v1.Resource resource = 1 [json_name = "resource"]; -
clearResource
The resource for the spans in this message. If this field is not set then no resource info is known.
.opentelemetry.proto.resource.v1.Resource resource = 1 [json_name = "resource"]; -
getScopeSpansList
A list of ScopeSpans that originate from a resource.
repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];- Specified by:
getScopeSpansListin interfaceResourceSpansOrBuilder
-
getScopeSpansCount
public int getScopeSpansCount()A list of ScopeSpans that originate from a resource.
repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];- Specified by:
getScopeSpansCountin interfaceResourceSpansOrBuilder
-
getScopeSpans
A list of ScopeSpans that originate from a resource.
repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];- Specified by:
getScopeSpansin interfaceResourceSpansOrBuilder
-
setScopeSpans
A list of ScopeSpans that originate from a resource.
repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"]; -
setScopeSpans
A list of ScopeSpans that originate from a resource.
repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"]; -
addScopeSpans
A list of ScopeSpans that originate from a resource.
repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"]; -
addScopeSpans
A list of ScopeSpans that originate from a resource.
repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"]; -
addScopeSpans
A list of ScopeSpans that originate from a resource.
repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"]; -
addScopeSpans
A list of ScopeSpans that originate from a resource.
repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"]; -
addAllScopeSpans
A list of ScopeSpans that originate from a resource.
repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"]; -
clearScopeSpans
A list of ScopeSpans that originate from a resource.
repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"]; -
removeScopeSpans
A list of ScopeSpans that originate from a resource.
repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"]; -
getSchemaUrl
The Schema URL, if known. This is the identifier of the Schema that the resource data is recorded in. Notably, the last part of the URL path is the version number of the schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see https://opentelemetry.io/docs/specs/otel/schemas/#schema-url This schema_url applies to the data in the "resource" field. It does not apply to the data in the "scope_spans" field which have their own schema_url field.
string schema_url = 3 [json_name = "schemaUrl"];- Specified by:
getSchemaUrlin interfaceResourceSpansOrBuilder- Returns:
- The schemaUrl.
-
getSchemaUrlBytes
public com.google.protobuf.ByteString getSchemaUrlBytes()The Schema URL, if known. This is the identifier of the Schema that the resource data is recorded in. Notably, the last part of the URL path is the version number of the schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see https://opentelemetry.io/docs/specs/otel/schemas/#schema-url This schema_url applies to the data in the "resource" field. It does not apply to the data in the "scope_spans" field which have their own schema_url field.
string schema_url = 3 [json_name = "schemaUrl"];- Specified by:
getSchemaUrlBytesin interfaceResourceSpansOrBuilder- Returns:
- The bytes for schemaUrl.
-
setSchemaUrl
The Schema URL, if known. This is the identifier of the Schema that the resource data is recorded in. Notably, the last part of the URL path is the version number of the schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see https://opentelemetry.io/docs/specs/otel/schemas/#schema-url This schema_url applies to the data in the "resource" field. It does not apply to the data in the "scope_spans" field which have their own schema_url field.
string schema_url = 3 [json_name = "schemaUrl"];- Parameters:
value- The schemaUrl to set.- Returns:
- This builder for chaining.
-
clearSchemaUrl
The Schema URL, if known. This is the identifier of the Schema that the resource data is recorded in. Notably, the last part of the URL path is the version number of the schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see https://opentelemetry.io/docs/specs/otel/schemas/#schema-url This schema_url applies to the data in the "resource" field. It does not apply to the data in the "scope_spans" field which have their own schema_url field.
string schema_url = 3 [json_name = "schemaUrl"];- Returns:
- This builder for chaining.
-
setSchemaUrlBytes
The Schema URL, if known. This is the identifier of the Schema that the resource data is recorded in. Notably, the last part of the URL path is the version number of the schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see https://opentelemetry.io/docs/specs/otel/schemas/#schema-url This schema_url applies to the data in the "resource" field. It does not apply to the data in the "scope_spans" field which have their own schema_url field.
string schema_url = 3 [json_name = "schemaUrl"];- Parameters:
value- The bytes for schemaUrl to set.- Returns:
- This builder for chaining.
-