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
  • 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:
      hasResource in interface ResourceSpansOrBuilder
      Returns:
      Whether the resource field is set.
    • getResource

      public Resource 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:
      getResource in interface ResourceSpansOrBuilder
      Returns:
      The resource.
    • setResource

      public ResourceSpans.Builder setResource(Resource value)
       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

      public ResourceSpans.Builder setResource(Resource.Builder builderForValue)
       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

      public ResourceSpans.Builder mergeResource(Resource value)
       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

      public ResourceSpans.Builder 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

      public List<ScopeSpans> getScopeSpansList()
       A list of ScopeSpans that originate from a resource.
       
      repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];
      Specified by:
      getScopeSpansList in interface ResourceSpansOrBuilder
    • 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:
      getScopeSpansCount in interface ResourceSpansOrBuilder
    • getScopeSpans

      public ScopeSpans getScopeSpans(int index)
       A list of ScopeSpans that originate from a resource.
       
      repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];
      Specified by:
      getScopeSpans in interface ResourceSpansOrBuilder
    • setScopeSpans

      public ResourceSpans.Builder setScopeSpans(int index, ScopeSpans value)
       A list of ScopeSpans that originate from a resource.
       
      repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];
    • setScopeSpans

      public ResourceSpans.Builder setScopeSpans(int index, ScopeSpans.Builder builderForValue)
       A list of ScopeSpans that originate from a resource.
       
      repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];
    • addScopeSpans

      public ResourceSpans.Builder addScopeSpans(ScopeSpans value)
       A list of ScopeSpans that originate from a resource.
       
      repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];
    • addScopeSpans

      public ResourceSpans.Builder addScopeSpans(int index, ScopeSpans value)
       A list of ScopeSpans that originate from a resource.
       
      repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];
    • addScopeSpans

      public ResourceSpans.Builder addScopeSpans(ScopeSpans.Builder builderForValue)
       A list of ScopeSpans that originate from a resource.
       
      repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];
    • addScopeSpans

      public ResourceSpans.Builder addScopeSpans(int index, ScopeSpans.Builder builderForValue)
       A list of ScopeSpans that originate from a resource.
       
      repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];
    • addAllScopeSpans

      public ResourceSpans.Builder addAllScopeSpans(Iterable<? extends ScopeSpans> values)
       A list of ScopeSpans that originate from a resource.
       
      repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];
    • clearScopeSpans

      public ResourceSpans.Builder clearScopeSpans()
       A list of ScopeSpans that originate from a resource.
       
      repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];
    • removeScopeSpans

      public ResourceSpans.Builder removeScopeSpans(int index)
       A list of ScopeSpans that originate from a resource.
       
      repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2 [json_name = "scopeSpans"];
    • getSchemaUrl

      public String 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:
      getSchemaUrl in interface ResourceSpansOrBuilder
      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:
      getSchemaUrlBytes in interface ResourceSpansOrBuilder
      Returns:
      The bytes for schemaUrl.
    • setSchemaUrl

      public ResourceSpans.Builder setSchemaUrl(String value)
       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

      public ResourceSpans.Builder 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

      public ResourceSpans.Builder setSchemaUrlBytes(com.google.protobuf.ByteString value)
       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.