Class ScopeSpans.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<ScopeSpans,ScopeSpans.Builder>
io.opentelemetry.proto.trace.v1.ScopeSpans.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, ScopeSpansOrBuilder, Cloneable
Enclosing class:
ScopeSpans

public static final class ScopeSpans.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<ScopeSpans,ScopeSpans.Builder> implements ScopeSpansOrBuilder
 A collection of Spans produced by an InstrumentationScope.
 
Protobuf type opentelemetry.proto.trace.v1.ScopeSpans
  • Method Details

    • hasScope

      public boolean hasScope()
       The instrumentation scope information for the spans in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1 [json_name = "scope"];
      Specified by:
      hasScope in interface ScopeSpansOrBuilder
      Returns:
      Whether the scope field is set.
    • getScope

      public InstrumentationScope getScope()
       The instrumentation scope information for the spans in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1 [json_name = "scope"];
      Specified by:
      getScope in interface ScopeSpansOrBuilder
      Returns:
      The scope.
    • setScope

      public ScopeSpans.Builder setScope(InstrumentationScope value)
       The instrumentation scope information for the spans in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1 [json_name = "scope"];
    • setScope

      public ScopeSpans.Builder setScope(InstrumentationScope.Builder builderForValue)
       The instrumentation scope information for the spans in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1 [json_name = "scope"];
    • mergeScope

      public ScopeSpans.Builder mergeScope(InstrumentationScope value)
       The instrumentation scope information for the spans in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1 [json_name = "scope"];
    • clearScope

      public ScopeSpans.Builder clearScope()
       The instrumentation scope information for the spans in this message.
       Semantically when InstrumentationScope isn't set, it is equivalent with
       an empty instrumentation scope name (unknown).
       
      .opentelemetry.proto.common.v1.InstrumentationScope scope = 1 [json_name = "scope"];
    • getSpansList

      public List<Span> getSpansList()
       A list of Spans that originate from an instrumentation scope.
       
      repeated .opentelemetry.proto.trace.v1.Span spans = 2 [json_name = "spans"];
      Specified by:
      getSpansList in interface ScopeSpansOrBuilder
    • getSpansCount

      public int getSpansCount()
       A list of Spans that originate from an instrumentation scope.
       
      repeated .opentelemetry.proto.trace.v1.Span spans = 2 [json_name = "spans"];
      Specified by:
      getSpansCount in interface ScopeSpansOrBuilder
    • getSpans

      public Span getSpans(int index)
       A list of Spans that originate from an instrumentation scope.
       
      repeated .opentelemetry.proto.trace.v1.Span spans = 2 [json_name = "spans"];
      Specified by:
      getSpans in interface ScopeSpansOrBuilder
    • setSpans

      public ScopeSpans.Builder setSpans(int index, Span value)
       A list of Spans that originate from an instrumentation scope.
       
      repeated .opentelemetry.proto.trace.v1.Span spans = 2 [json_name = "spans"];
    • setSpans

      public ScopeSpans.Builder setSpans(int index, Span.Builder builderForValue)
       A list of Spans that originate from an instrumentation scope.
       
      repeated .opentelemetry.proto.trace.v1.Span spans = 2 [json_name = "spans"];
    • addSpans

      public ScopeSpans.Builder addSpans(Span value)
       A list of Spans that originate from an instrumentation scope.
       
      repeated .opentelemetry.proto.trace.v1.Span spans = 2 [json_name = "spans"];
    • addSpans

      public ScopeSpans.Builder addSpans(int index, Span value)
       A list of Spans that originate from an instrumentation scope.
       
      repeated .opentelemetry.proto.trace.v1.Span spans = 2 [json_name = "spans"];
    • addSpans

      public ScopeSpans.Builder addSpans(Span.Builder builderForValue)
       A list of Spans that originate from an instrumentation scope.
       
      repeated .opentelemetry.proto.trace.v1.Span spans = 2 [json_name = "spans"];
    • addSpans

      public ScopeSpans.Builder addSpans(int index, Span.Builder builderForValue)
       A list of Spans that originate from an instrumentation scope.
       
      repeated .opentelemetry.proto.trace.v1.Span spans = 2 [json_name = "spans"];
    • addAllSpans

      public ScopeSpans.Builder addAllSpans(Iterable<? extends Span> values)
       A list of Spans that originate from an instrumentation scope.
       
      repeated .opentelemetry.proto.trace.v1.Span spans = 2 [json_name = "spans"];
    • clearSpans

      public ScopeSpans.Builder clearSpans()
       A list of Spans that originate from an instrumentation scope.
       
      repeated .opentelemetry.proto.trace.v1.Span spans = 2 [json_name = "spans"];
    • removeSpans

      public ScopeSpans.Builder removeSpans(int index)
       A list of Spans that originate from an instrumentation scope.
       
      repeated .opentelemetry.proto.trace.v1.Span spans = 2 [json_name = "spans"];
    • getSchemaUrl

      public String getSchemaUrl()
       The Schema URL, if known. This is the identifier of the Schema that the span 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 "scope" field and all spans and span
       events in the "spans" field.
       
      string schema_url = 3 [json_name = "schemaUrl"];
      Specified by:
      getSchemaUrl in interface ScopeSpansOrBuilder
      Returns:
      The schemaUrl.
    • getSchemaUrlBytes

      public com.google.protobuf.ByteString getSchemaUrlBytes()
       The Schema URL, if known. This is the identifier of the Schema that the span 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 "scope" field and all spans and span
       events in the "spans" field.
       
      string schema_url = 3 [json_name = "schemaUrl"];
      Specified by:
      getSchemaUrlBytes in interface ScopeSpansOrBuilder
      Returns:
      The bytes for schemaUrl.
    • setSchemaUrl

      public ScopeSpans.Builder setSchemaUrl(String value)
       The Schema URL, if known. This is the identifier of the Schema that the span 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 "scope" field and all spans and span
       events in the "spans" field.
       
      string schema_url = 3 [json_name = "schemaUrl"];
      Parameters:
      value - The schemaUrl to set.
      Returns:
      This builder for chaining.
    • clearSchemaUrl

      public ScopeSpans.Builder clearSchemaUrl()
       The Schema URL, if known. This is the identifier of the Schema that the span 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 "scope" field and all spans and span
       events in the "spans" field.
       
      string schema_url = 3 [json_name = "schemaUrl"];
      Returns:
      This builder for chaining.
    • setSchemaUrlBytes

      public ScopeSpans.Builder setSchemaUrlBytes(com.google.protobuf.ByteString value)
       The Schema URL, if known. This is the identifier of the Schema that the span 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 "scope" field and all spans and span
       events in the "spans" field.
       
      string schema_url = 3 [json_name = "schemaUrl"];
      Parameters:
      value - The bytes for schemaUrl to set.
      Returns:
      This builder for chaining.