Class APMTraceSpan

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

@Generated("https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class APMTraceSpan extends Object
A single APM span returned as part of a trace.
  • Field Details

  • Constructor Details

  • Method Details

    • duration

      public APMTraceSpan duration(Long duration)
    • getDuration

      public Long getDuration()
      The duration of the span, in nanoseconds.
      Returns:
      duration
    • setDuration

      public void setDuration(Long duration)
    • endTime

      public APMTraceSpan endTime(Long endTime)
    • getEndTime

      public Long getEndTime()
      The end time of the span, in Unix nanoseconds.
      Returns:
      endTime
    • setEndTime

      public void setEndTime(Long endTime)
    • error

      public APMTraceSpan error(APMSpanErrorFlag error)
    • getError

      public APMSpanErrorFlag getError()
      Error flag for a span. 1 when the span is in error, 0 otherwise.
      Returns:
      error
    • setError

      public void setError(APMSpanErrorFlag error)
    • meta

      public APMTraceSpan meta(Map<String,String> meta)
    • putMetaItem

      public APMTraceSpan putMetaItem(String key, String metaItem)
    • getMeta

      public Map<String,String> getMeta()
      String-valued tags attached to the span. Tag keys starting with _ are filtered out of the response.
      Returns:
      meta
    • setMeta

      public void setMeta(Map<String,String> meta)
    • metrics

      public APMTraceSpan metrics(Map<String,Double> metrics)
    • putMetricsItem

      public APMTraceSpan putMetricsItem(String key, Double metricsItem)
    • getMetrics

      public Map<String,Double> getMetrics()
      Numeric metrics attached to the span. Metric keys starting with _ are filtered out of the response.
      Returns:
      metrics
    • setMetrics

      public void setMetrics(Map<String,Double> metrics)
    • name

      public APMTraceSpan name(String name)
    • getName

      public String getName()
      The operation name of the span.
      Returns:
      name
    • setName

      public void setName(String name)
    • parentId

      public APMTraceSpan parentId(Long parentId)
    • getParentId

      public Long getParentId()
      The ID of the parent span, or 0 when the span is a trace root.
      Returns:
      parentId
    • setParentId

      public void setParentId(Long parentId)
    • resource

      public APMTraceSpan resource(String resource)
    • getResource

      public String getResource()
      The resource that the span describes.
      Returns:
      resource
    • setResource

      public void setResource(String resource)
    • resourceHash

      public APMTraceSpan resourceHash(String resourceHash)
    • getResourceHash

      @Nullable public String getResourceHash()
      A hash of the resource field.
      Returns:
      resourceHash
    • setResourceHash

      public void setResourceHash(String resourceHash)
    • restricted

      public APMTraceSpan restricted(Boolean restricted)
    • getRestricted

      @Nullable public Boolean getRestricted()
      Whether access to the span is restricted by the organization's data access policies.
      Returns:
      restricted
    • setRestricted

      public void setRestricted(Boolean restricted)
    • selfTime

      public APMTraceSpan selfTime(Double selfTime)
    • getSelfTime

      @Nullable public Double getSelfTime()
      The time spent in the span itself, excluding time spent in child spans, in nanoseconds.
      Returns:
      selfTime
    • setSelfTime

      public void setSelfTime(Double selfTime)
    • service

      public APMTraceSpan service(String service)
    • getService

      public String getService()
      The name of the service that emitted the span.
      Returns:
      service
    • setService

      public void setService(String service)
    • spanId

      public APMTraceSpan spanId(Long spanId)
    • getSpanId

      public Long getSpanId()
      The span ID, as an unsigned 64-bit integer.
      Returns:
      spanId
    • setSpanId

      public void setSpanId(Long spanId)
    • startTime

      public APMTraceSpan startTime(Long startTime)
    • getStartTime

      public Long getStartTime()
      The start time of the span, in Unix nanoseconds.
      Returns:
      startTime
    • setStartTime

      public void setStartTime(Long startTime)
    • traceId

      public APMTraceSpan traceId(Long traceId)
    • getTraceId

      public Long getTraceId()
      The lower 64 bits of the trace ID, as an unsigned 64-bit integer.
      Returns:
      traceId
    • setTraceId

      public void setTraceId(Long traceId)
    • traceIdFull

      public APMTraceSpan traceIdFull(String traceIdFull)
    • getTraceIdFull

      public String getTraceIdFull()
      The full 128-bit trace ID, encoded as a 32-character hexadecimal string.
      Returns:
      traceIdFull
    • setTraceIdFull

      public void setTraceIdFull(String traceIdFull)
    • type

      public APMTraceSpan type(String type)
    • getType

      public String getType()
      The type of the span (for example, web, db, or rpc).
      Returns:
      type
    • setType

      public void setType(String type)
    • putAdditionalProperty

      public APMTraceSpan 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:
      APMTraceSpan
    • 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 APMTraceSpan 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