Class SpansAttributes

java.lang.Object
com.datadog.api.client.v2.model.SpansAttributes

@Generated("https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SpansAttributes extends Object
JSON object containing all span attributes and their associated values.
  • Field Details

  • Constructor Details

    • SpansAttributes

      public SpansAttributes()
  • Method Details

    • attributes

      public SpansAttributes attributes(Map<String,Object> attributes)
    • putAttributesItem

      public SpansAttributes putAttributesItem(String key, Object attributesItem)
    • getAttributes

      @Nullable public Map<String,Object> getAttributes()
      JSON object of attributes from your span.
      Returns:
      attributes
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
    • custom

      public SpansAttributes custom(Map<String,Object> custom)
    • putCustomItem

      public SpansAttributes putCustomItem(String key, Object customItem)
    • getCustom

      @Nullable public Map<String,Object> getCustom()
      JSON object of custom spans data.
      Returns:
      custom
    • setCustom

      public void setCustom(Map<String,Object> custom)
    • endTimestamp

      public SpansAttributes endTimestamp(OffsetDateTime endTimestamp)
    • getEndTimestamp

      @Nullable public OffsetDateTime getEndTimestamp()
      End timestamp of your span.
      Returns:
      endTimestamp
    • setEndTimestamp

      public void setEndTimestamp(OffsetDateTime endTimestamp)
    • env

      public SpansAttributes env(String env)
    • getEnv

      @Nullable public String getEnv()
      Name of the environment from where the spans are being sent.
      Returns:
      env
    • setEnv

      public void setEnv(String env)
    • host

      public SpansAttributes host(String host)
    • getHost

      @Nullable public String getHost()
      Name of the machine from where the spans are being sent.
      Returns:
      host
    • setHost

      public void setHost(String host)
    • ingestionReason

      public SpansAttributes ingestionReason(String ingestionReason)
    • getIngestionReason

      @Nullable public String getIngestionReason()
      The reason why the span was ingested.
      Returns:
      ingestionReason
    • setIngestionReason

      public void setIngestionReason(String ingestionReason)
    • parentId

      public SpansAttributes parentId(String parentId)
    • getParentId

      @Nullable public String getParentId()
      Id of the span that's parent of this span.
      Returns:
      parentId
    • setParentId

      public void setParentId(String parentId)
    • resourceHash

      public SpansAttributes resourceHash(String resourceHash)
    • getResourceHash

      @Nullable public String getResourceHash()
      Unique identifier of the resource.
      Returns:
      resourceHash
    • setResourceHash

      public void setResourceHash(String resourceHash)
    • resourceName

      public SpansAttributes resourceName(String resourceName)
    • getResourceName

      @Nullable public String getResourceName()
      The name of the resource.
      Returns:
      resourceName
    • setResourceName

      public void setResourceName(String resourceName)
    • retainedBy

      public SpansAttributes retainedBy(String retainedBy)
    • getRetainedBy

      @Nullable public String getRetainedBy()
      The reason why the span was indexed.
      Returns:
      retainedBy
    • setRetainedBy

      public void setRetainedBy(String retainedBy)
    • service

      public SpansAttributes service(String service)
    • getService

      @Nullable public String getService()
      The name of the application or service generating the span events. It is used to switch from APM to Logs, so make sure you define the same value when you use both products.
      Returns:
      service
    • setService

      public void setService(String service)
    • singleSpan

      public SpansAttributes singleSpan(Boolean singleSpan)
    • getSingleSpan

      @Nullable public Boolean getSingleSpan()
      Whether or not the span was collected as a stand-alone span. Always associated to "single_span" ingestion_reason if true.
      Returns:
      singleSpan
    • setSingleSpan

      public void setSingleSpan(Boolean singleSpan)
    • spanId

      public SpansAttributes spanId(String spanId)
    • getSpanId

      @Nullable public String getSpanId()
      Id of the span.
      Returns:
      spanId
    • setSpanId

      public void setSpanId(String spanId)
    • startTimestamp

      public SpansAttributes startTimestamp(OffsetDateTime startTimestamp)
    • getStartTimestamp

      @Nullable public OffsetDateTime getStartTimestamp()
      Start timestamp of your span.
      Returns:
      startTimestamp
    • setStartTimestamp

      public void setStartTimestamp(OffsetDateTime startTimestamp)
    • tags

      public SpansAttributes tags(List<String> tags)
    • addTagsItem

      public SpansAttributes addTagsItem(String tagsItem)
    • getTags

      @Nullable public List<String> getTags()
      Array of tags associated with your span.
      Returns:
      tags
    • setTags

      public void setTags(List<String> tags)
    • traceId

      public SpansAttributes traceId(String traceId)
    • getTraceId

      @Nullable public String getTraceId()
      Id of the trace to which the span belongs.
      Returns:
      traceId
    • setTraceId

      public void setTraceId(String traceId)
    • type

      public SpansAttributes type(String type)
    • getType

      @Nullable public String getType()
      The type of the span.
      Returns:
      type
    • setType

      public void setType(String type)
    • putAdditionalProperty

      public SpansAttributes putAdditionalProperty(String key, Object value)
      Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.
      Parameters:
      key - The arbitrary key to set
      value - The associated value
      Returns:
      SpansAttributes
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Return the additional (undeclared) property.
      Returns:
      The additional properties
    • getAdditionalProperty

      public Object getAdditionalProperty(String key)
      Return the additional (undeclared) property with the specified name.
      Parameters:
      key - The arbitrary key to get
      Returns:
      The specific additional property for the given key
    • equals

      public boolean equals(Object o)
      Return true if this SpansAttributes object is equal to o.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object