NAME

Google::Devtools::Cloudtrace::V2::Trace - Compiled Protocol Buffers messages for google/devtools/cloudtrace/v2/trace.proto

SYNOPSIS

use Google::Devtools::Cloudtrace::V2::Trace;

my $msg = Google::Devtools::Cloudtrace::V2::Trace::Span->new({
    name => $name,
    span_id => $span_id,
    parent_span_id => $parent_span_id,
    display_name => $display_name,
});

# Read or update a field
my $val = $msg->name();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Devtools::Cloudtrace::V2::Trace::Span->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/devtools/cloudtrace/v2/trace.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Devtools::Cloudtrace::V2::Trace::Span

A span represents a single operation within a trace. Spans can be nested to form a trace tree. Often, a trace contains a root span that describes the end-to-end latency, and one or more subspans for its sub-operations.

A trace can also contain multiple root spans, or none at all. Spans do not need to be contiguous. There might be gaps or overlaps between spans in a trace.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The resource name of the span in the following format:

    * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]`

    `[TRACE_ID]` is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. It should not be zero.

    `[SPAN_ID]` is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array. It should not be zero. .

  • $msg->span_id() / $msg->span_id($value)

    Type: String

    Required. The `[SPAN_ID]` portion of the span's resource name.

  • $msg->parent_span_id() / $msg->parent_span_id($value)

    Type: String

    The `[SPAN_ID]` of this span's parent span. If this is a root span, then this field must be empty.

  • $msg->display_name() / $msg->display_name($value)

    Type: Message (Google::Devtools::Cloudtrace::V2::Trace::TruncatableString)

    Required. A description of the span's operation (up to 128 bytes). Cloud Trace displays the description in the Cloud console. For example, the display name can be a qualified method name or a file name and a line number where the operation is called. A best practice is to use the same display name within an application and at the same call point. This makes it easier to correlate spans in different traces.

  • $msg->start_time() / $msg->start_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Required. The start time of the span. On the client side, this is the time kept by the local machine where the span execution starts. On the server side, this is the time when the server's application handler starts running.

  • $msg->end_time() / $msg->end_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Required. The end time of the span. On the client side, this is the time kept by the local machine where the span execution ends. On the server side, this is the time when the server application handler stops running.

  • $msg->attributes() / $msg->attributes($value)

    Type: Message (Google::Devtools::Cloudtrace::V2::Trace::Span::Attributes)

    A set of attributes on the span. You can have up to 32 attributes per span.

  • $msg->stack_trace() / $msg->stack_trace($value)

    Type: Message (Google::Devtools::Cloudtrace::V2::Trace::StackTrace)

    Stack trace captured at the start of the span.

  • $msg->time_events() / $msg->time_events($value)

    Type: Message (Google::Devtools::Cloudtrace::V2::Trace::Span::TimeEvents)

    A set of time events. You can have up to 32 annotations and 128 message events per span.

  • $msg->links() / $msg->links($value)

    Type: Message (Google::Devtools::Cloudtrace::V2::Trace::Span::Links)

    Links associated with the span. You can have up to 128 links per Span.

  • $msg->status() / $msg->status($value)

    Type: Message (Google::Rpc::Status::Status)

    Optional. The final status for this span.

  • $msg->same_process_as_parent_span() / $msg->same_process_as_parent_span($value)

    Type: Message (Google::Protobuf::Wrappers::BoolValue)

    Optional. Set this parameter to indicate whether this span is in the same process as its parent. If you do not set this parameter, Trace is unable to take advantage of this helpful information.

  • $msg->child_span_count() / $msg->child_span_count($value)

    Type: Message (Google::Protobuf::Wrappers::Int32Value)

    Optional. The number of child spans that were generated while this span was active. If set, allows implementation to detect missing child spans.

  • $msg->span_kind() / $msg->span_kind($value)

    Type: Enum (Google::Devtools::Cloudtrace::V2::Span::SpanKind)

    Optional. Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call.

Enum: Span::SpanKind

  • SPAN_KIND_UNSPECIFIED => 0

  • INTERNAL => 1

  • SERVER => 2

  • CLIENT => 3

  • PRODUCER => 4

  • CONSUMER => 5

Google::Devtools::Cloudtrace::V2::Trace::AttributeValue

The allowed types for `[VALUE]` in a `[KEY]:[VALUE]` attribute.

Inherits from Protobuf::Message.

Accessors

  • $msg->string_value() / $msg->string_value($value)

    Type: Message (Google::Devtools::Cloudtrace::V2::Trace::TruncatableString)

    A string up to 256 bytes long.

  • $msg->int_value() / $msg->int_value($value)

    Type: Int64

    A 64-bit signed integer.

  • $msg->bool_value() / $msg->bool_value($value)

    Type: Bool

    A Boolean value represented by `true` or `false`.

Google::Devtools::Cloudtrace::V2::Trace::StackTrace

A call stack appearing in a trace.

Inherits from Protobuf::Message.

Accessors

  • $msg->stack_frames() / $msg->stack_frames($value)

    Type: Message (Google::Devtools::Cloudtrace::V2::Trace::StackTrace::StackFrames)

    Stack frames in this stack trace. A maximum of 128 frames are allowed.

  • $msg->stack_trace_hash_id() / $msg->stack_trace_hash_id($value)

    Type: Int64

    The hash ID is used to conserve network bandwidth for duplicate stack traces within a single trace.

    Often multiple spans will have identical stack traces. The first occurrence of a stack trace should contain both the `stackFrame` content and a value in `stackTraceHashId`.

    Subsequent spans within the same request can refer to that stack trace by only setting `stackTraceHashId`.

Google::Devtools::Cloudtrace::V2::Trace::Module

Binary module.

Inherits from Protobuf::Message.

Accessors

Google::Devtools::Cloudtrace::V2::Trace::TruncatableString

Represents a string that might be shortened to a specified length.

Inherits from Protobuf::Message.

Accessors

  • $msg->value() / $msg->value($value)

    Type: String

    The shortened string. For example, if the original string is 500 bytes long and the limit of the string is 128 bytes, then `value` contains the first 128 bytes of the 500-byte string.

    Truncation always happens on a UTF8 character boundary. If there are multi-byte characters in the string, then the length of the shortened string might be less than the size limit.

  • $msg->truncated_byte_count() / $msg->truncated_byte_count($value)

    Type: Int32

    The number of bytes removed from the original string. If this value is 0, then the string was not shortened.

SEE ALSO

Protobuf, Protobuf::Message, Google::Devtools::Cloudtrace::V2::Trace::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.