trace

package
v0.0.0-...-e70f483 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package trace provides utilities for creating and submitting traces in serverless-init

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitSpan

func InitSpan(service, name, resource, spanType string, startTime int64, tags map[string]string) *pb.Span

InitSpan creates a new span with the provided metadata

func SubmitSpan

func SubmitSpan(span *pb.Span, origin string, traceAgent Processor)

SubmitSpan submits a completed span to the trace agent

Types

type CloudRunJobsSpanModifier

type CloudRunJobsSpanModifier struct {
	// contains filtered or unexported fields
}

CloudRunJobsSpanModifier reparents user spans under the Cloud Run Job span.

This modifier adopts the TraceID from the first span seen (regardless of ParentID) and only reparents root spans (ParentID=0). Child spans are left unmodified to preserve the original span hierarchy.

In trace propagation scenarios where all spans have non-zero ParentIDs, the job span will be "floating" (unparented) within the trace. This is an acceptable trade-off as all spans will still share the same TraceID for log-trace correlation.

func NewCloudRunJobsSpanModifier

func NewCloudRunJobsSpanModifier(jobSpan *pb.Span) *CloudRunJobsSpanModifier

NewCloudRunJobsSpanModifier creates a new span modifier for Cloud Run Jobs

func (*CloudRunJobsSpanModifier) ModifySpan

func (m *CloudRunJobsSpanModifier) ModifySpan(_ *pb.TraceChunk, span *pb.Span)

ModifySpan reparents user spans under the Cloud Run Job span

type Processor

type Processor interface {
	Process(*api.Payload)
}

Processor is an interface for processing trace payloads

type SpanModifierSetter

type SpanModifierSetter interface {
	SetSpanModifier(agent.SpanModifier)
}

SpanModifierSetter is an interface for setting span modifiers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL