Class: Google::Apis::CloudtraceV1::Trace

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudtrace_v1/classes.rb,
generated/google/apis/cloudtrace_v1/representations.rb,
generated/google/apis/cloudtrace_v1/representations.rb

Overview

A trace describes how long it takes for an application to perform an operation. It consists of a set of spans, each of which represent a single timed event within the operation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Trace

Returns a new instance of Trace.



74
75
76
# File 'generated/google/apis/cloudtrace_v1/classes.rb', line 74

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#project_idString

Project ID of the Cloud project where the trace data is stored. Corresponds to the JSON property projectId

Returns:

  • (String)


61
62
63
# File 'generated/google/apis/cloudtrace_v1/classes.rb', line 61

def project_id
  @project_id
end

#spansArray<Google::Apis::CloudtraceV1::TraceSpan>

Collection of spans in the trace. Corresponds to the JSON property spans



72
73
74
# File 'generated/google/apis/cloudtrace_v1/classes.rb', line 72

def spans
  @spans
end

#trace_idString

Globally unique identifier for the trace. This identifier is a 128-bit numeric value formatted as a 32-byte hex string. Corresponds to the JSON property traceId

Returns:

  • (String)


67
68
69
# File 'generated/google/apis/cloudtrace_v1/classes.rb', line 67

def trace_id
  @trace_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



79
80
81
82
83
# File 'generated/google/apis/cloudtrace_v1/classes.rb', line 79

def update!(**args)
  @project_id = args[:project_id] if args.key?(:project_id)
  @trace_id = args[:trace_id] if args.key?(:trace_id)
  @spans = args[:spans] if args.key?(:spans)
end