v1development

package
v1.36.11-2025110320484... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_opentelemetry_proto_profiles_v1development_profiles_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Function

type Function struct {

	// The function name. Empty string if not available.
	NameStrindex int32 `protobuf:"varint,1,opt,name=name_strindex,json=nameStrindex,proto3" json:"name_strindex,omitempty"`
	// Function name, as identified by the system. For instance,
	// it can be a C++ mangled name. Empty string if not available.
	SystemNameStrindex int32 `protobuf:"varint,2,opt,name=system_name_strindex,json=systemNameStrindex,proto3" json:"system_name_strindex,omitempty"`
	// Source file containing the function. Empty string if not available.
	FilenameStrindex int32 `protobuf:"varint,3,opt,name=filename_strindex,json=filenameStrindex,proto3" json:"filename_strindex,omitempty"`
	// Line number in source file. 0 means unset.
	StartLine int64 `protobuf:"varint,4,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"`
	// contains filtered or unexported fields
}

Describes a function, including its human-readable name, system name, source file, and starting line number in the source.

func (*Function) GetFilenameStrindex

func (x *Function) GetFilenameStrindex() int32

func (*Function) GetNameStrindex

func (x *Function) GetNameStrindex() int32

func (*Function) GetStartLine

func (x *Function) GetStartLine() int64

func (*Function) GetSystemNameStrindex

func (x *Function) GetSystemNameStrindex() int32

func (*Function) ProtoMessage

func (*Function) ProtoMessage()

func (*Function) ProtoReflect

func (x *Function) ProtoReflect() protoreflect.Message

func (*Function) Reset

func (x *Function) Reset()

func (*Function) SetFilenameStrindex

func (x *Function) SetFilenameStrindex(v int32)

func (*Function) SetNameStrindex

func (x *Function) SetNameStrindex(v int32)

func (*Function) SetStartLine

func (x *Function) SetStartLine(v int64)

func (*Function) SetSystemNameStrindex

func (x *Function) SetSystemNameStrindex(v int32)

func (*Function) String

func (x *Function) String() string

type Function_builder

type Function_builder struct {

	// The function name. Empty string if not available.
	NameStrindex int32
	// Function name, as identified by the system. For instance,
	// it can be a C++ mangled name. Empty string if not available.
	SystemNameStrindex int32
	// Source file containing the function. Empty string if not available.
	FilenameStrindex int32
	// Line number in source file. 0 means unset.
	StartLine int64
	// contains filtered or unexported fields
}

func (Function_builder) Build

func (b0 Function_builder) Build() *Function

type KeyValueAndUnit

type KeyValueAndUnit struct {

	// The index into the string table for the attribute's key.
	KeyStrindex int32 `protobuf:"varint,1,opt,name=key_strindex,json=keyStrindex,proto3" json:"key_strindex,omitempty"`
	// The value of the attribute.
	Value *v11.AnyValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// The index into the string table for the attribute's unit.
	// zero indicates implicit (by semconv) or non-defined unit.
	UnitStrindex int32 `protobuf:"varint,3,opt,name=unit_strindex,json=unitStrindex,proto3" json:"unit_strindex,omitempty"`
	// contains filtered or unexported fields
}

A custom 'dictionary native' style of encoding attributes which is more convenient for profiles than opentelemetry.proto.common.v1.KeyValue Specifically, uses the string table for keys and allows optional unit information.

func (*KeyValueAndUnit) ClearValue

func (x *KeyValueAndUnit) ClearValue()

func (*KeyValueAndUnit) GetKeyStrindex

func (x *KeyValueAndUnit) GetKeyStrindex() int32

func (*KeyValueAndUnit) GetUnitStrindex

func (x *KeyValueAndUnit) GetUnitStrindex() int32

func (*KeyValueAndUnit) GetValue

func (x *KeyValueAndUnit) GetValue() *v11.AnyValue

func (*KeyValueAndUnit) HasValue

func (x *KeyValueAndUnit) HasValue() bool

func (*KeyValueAndUnit) ProtoMessage

func (*KeyValueAndUnit) ProtoMessage()

func (*KeyValueAndUnit) ProtoReflect

func (x *KeyValueAndUnit) ProtoReflect() protoreflect.Message

func (*KeyValueAndUnit) Reset

func (x *KeyValueAndUnit) Reset()

func (*KeyValueAndUnit) SetKeyStrindex

func (x *KeyValueAndUnit) SetKeyStrindex(v int32)

func (*KeyValueAndUnit) SetUnitStrindex

func (x *KeyValueAndUnit) SetUnitStrindex(v int32)

func (*KeyValueAndUnit) SetValue

func (x *KeyValueAndUnit) SetValue(v *v11.AnyValue)

func (*KeyValueAndUnit) String

func (x *KeyValueAndUnit) String() string

type KeyValueAndUnit_builder

type KeyValueAndUnit_builder struct {

	// The index into the string table for the attribute's key.
	KeyStrindex int32
	// The value of the attribute.
	Value *v11.AnyValue
	// The index into the string table for the attribute's unit.
	// zero indicates implicit (by semconv) or non-defined unit.
	UnitStrindex int32
	// contains filtered or unexported fields
}

func (KeyValueAndUnit_builder) Build

type Line

type Line struct {

	// Reference to function in ProfilesDictionary.function_table.
	FunctionIndex int32 `protobuf:"varint,1,opt,name=function_index,json=functionIndex,proto3" json:"function_index,omitempty"`
	// Line number in source code. 0 means unset.
	Line int64 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"`
	// Column number in source code. 0 means unset.
	Column int64 `protobuf:"varint,3,opt,name=column,proto3" json:"column,omitempty"`
	// contains filtered or unexported fields
}

Details a specific line in a source code, linked to a function.

func (*Line) GetColumn

func (x *Line) GetColumn() int64

func (*Line) GetFunctionIndex

func (x *Line) GetFunctionIndex() int32

func (*Line) GetLine

func (x *Line) GetLine() int64

func (*Line) ProtoMessage

func (*Line) ProtoMessage()

func (*Line) ProtoReflect

func (x *Line) ProtoReflect() protoreflect.Message

func (*Line) Reset

func (x *Line) Reset()

func (*Line) SetColumn

func (x *Line) SetColumn(v int64)

func (*Line) SetFunctionIndex

func (x *Line) SetFunctionIndex(v int32)

func (*Line) SetLine

func (x *Line) SetLine(v int64)

func (*Line) String

func (x *Line) String() string

type Line_builder

type Line_builder struct {

	// Reference to function in ProfilesDictionary.function_table.
	FunctionIndex int32
	// Line number in source code. 0 means unset.
	Line int64
	// Column number in source code. 0 means unset.
	Column int64
	// contains filtered or unexported fields
}

func (Line_builder) Build

func (b0 Line_builder) Build() *Line
type Link struct {

	// A unique identifier of a trace that this linked span is part of. The ID is a
	// 16-byte array.
	TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
	// A unique identifier for the linked span. The ID is an 8-byte array.
	SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
	// contains filtered or unexported fields
}

A pointer from a profile Sample to a trace Span. Connects a profile sample to a trace span, identified by unique trace and span IDs.

func (*Link) GetSpanId

func (x *Link) GetSpanId() []byte

func (*Link) GetTraceId

func (x *Link) GetTraceId() []byte

func (*Link) ProtoMessage

func (*Link) ProtoMessage()

func (*Link) ProtoReflect

func (x *Link) ProtoReflect() protoreflect.Message

func (*Link) Reset

func (x *Link) Reset()

func (*Link) SetSpanId

func (x *Link) SetSpanId(v []byte)

func (*Link) SetTraceId

func (x *Link) SetTraceId(v []byte)

func (*Link) String

func (x *Link) String() string
type Link_builder struct {

	// A unique identifier of a trace that this linked span is part of. The ID is a
	// 16-byte array.
	TraceId []byte
	// A unique identifier for the linked span. The ID is an 8-byte array.
	SpanId []byte
	// contains filtered or unexported fields
}
func (b0 Link_builder) Build() *Link

type Location

type Location struct {

	// Reference to mapping in ProfilesDictionary.mapping_table.
	// It can be unset / set to 0 if the mapping is unknown or not applicable for
	// this profile type, as mapping_table[0] is always a 'null' default mapping.
	MappingIndex int32 `protobuf:"varint,1,opt,name=mapping_index,json=mappingIndex,proto3" json:"mapping_index,omitempty"`
	// The instruction address for this location, if available.  It
	// should be within [Mapping.memory_start...Mapping.memory_limit]
	// for the corresponding mapping. A non-leaf address may be in the
	// middle of a call instruction. It is up to display tools to find
	// the beginning of the instruction if necessary.
	Address uint64 `protobuf:"varint,2,opt,name=address,proto3" json:"address,omitempty"`
	// Multiple line indicates this location has inlined functions,
	// where the last entry represents the caller into which the
	// preceding entries were inlined.
	//
	// E.g., if memcpy() is inlined into printf:
	//
	//	lines[0].function_name == "memcpy"
	//	lines[1].function_name == "printf"
	Lines []*Line `protobuf:"bytes,3,rep,name=lines,proto3" json:"lines,omitempty"`
	// References to attributes in ProfilesDictionary.attribute_table. [optional]
	AttributeIndices []int32 `protobuf:"varint,4,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"`
	// contains filtered or unexported fields
}

Describes function and line table debug information.

func (*Location) GetAddress

func (x *Location) GetAddress() uint64

func (*Location) GetAttributeIndices

func (x *Location) GetAttributeIndices() []int32

func (*Location) GetLines

func (x *Location) GetLines() []*Line

func (*Location) GetMappingIndex

func (x *Location) GetMappingIndex() int32

func (*Location) ProtoMessage

func (*Location) ProtoMessage()

func (*Location) ProtoReflect

func (x *Location) ProtoReflect() protoreflect.Message

func (*Location) Reset

func (x *Location) Reset()

func (*Location) SetAddress

func (x *Location) SetAddress(v uint64)

func (*Location) SetAttributeIndices

func (x *Location) SetAttributeIndices(v []int32)

func (*Location) SetLines

func (x *Location) SetLines(v []*Line)

func (*Location) SetMappingIndex

func (x *Location) SetMappingIndex(v int32)

func (*Location) String

func (x *Location) String() string

type Location_builder

type Location_builder struct {

	// Reference to mapping in ProfilesDictionary.mapping_table.
	// It can be unset / set to 0 if the mapping is unknown or not applicable for
	// this profile type, as mapping_table[0] is always a 'null' default mapping.
	MappingIndex int32
	// The instruction address for this location, if available.  It
	// should be within [Mapping.memory_start...Mapping.memory_limit]
	// for the corresponding mapping. A non-leaf address may be in the
	// middle of a call instruction. It is up to display tools to find
	// the beginning of the instruction if necessary.
	Address uint64
	// Multiple line indicates this location has inlined functions,
	// where the last entry represents the caller into which the
	// preceding entries were inlined.
	//
	// E.g., if memcpy() is inlined into printf:
	//
	//	lines[0].function_name == "memcpy"
	//	lines[1].function_name == "printf"
	Lines []*Line
	// References to attributes in ProfilesDictionary.attribute_table. [optional]
	AttributeIndices []int32
	// contains filtered or unexported fields
}

func (Location_builder) Build

func (b0 Location_builder) Build() *Location

type Mapping

type Mapping struct {

	// Address at which the binary (or DLL) is loaded into memory.
	MemoryStart uint64 `protobuf:"varint,1,opt,name=memory_start,json=memoryStart,proto3" json:"memory_start,omitempty"`
	// The limit of the address range occupied by this mapping.
	MemoryLimit uint64 `protobuf:"varint,2,opt,name=memory_limit,json=memoryLimit,proto3" json:"memory_limit,omitempty"`
	// Offset in the binary that corresponds to the first mapped address.
	FileOffset uint64 `protobuf:"varint,3,opt,name=file_offset,json=fileOffset,proto3" json:"file_offset,omitempty"`
	// The object this entry is loaded from.  This can be a filename on
	// disk for the main binary and shared libraries, or virtual
	// abstractions like "[vdso]".
	FilenameStrindex int32 `protobuf:"varint,4,opt,name=filename_strindex,json=filenameStrindex,proto3" json:"filename_strindex,omitempty"` // Index into ProfilesDictionary.string_table.
	// References to attributes in ProfilesDictionary.attribute_table. [optional]
	AttributeIndices []int32 `protobuf:"varint,5,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"`
	// contains filtered or unexported fields
}

Describes the mapping of a binary in memory, including its address range, file offset, and metadata like build ID

func (*Mapping) GetAttributeIndices

func (x *Mapping) GetAttributeIndices() []int32

func (*Mapping) GetFileOffset

func (x *Mapping) GetFileOffset() uint64

func (*Mapping) GetFilenameStrindex

func (x *Mapping) GetFilenameStrindex() int32

func (*Mapping) GetMemoryLimit

func (x *Mapping) GetMemoryLimit() uint64

func (*Mapping) GetMemoryStart

func (x *Mapping) GetMemoryStart() uint64

func (*Mapping) ProtoMessage

func (*Mapping) ProtoMessage()

func (*Mapping) ProtoReflect

func (x *Mapping) ProtoReflect() protoreflect.Message

func (*Mapping) Reset

func (x *Mapping) Reset()

func (*Mapping) SetAttributeIndices

func (x *Mapping) SetAttributeIndices(v []int32)

func (*Mapping) SetFileOffset

func (x *Mapping) SetFileOffset(v uint64)

func (*Mapping) SetFilenameStrindex

func (x *Mapping) SetFilenameStrindex(v int32)

func (*Mapping) SetMemoryLimit

func (x *Mapping) SetMemoryLimit(v uint64)

func (*Mapping) SetMemoryStart

func (x *Mapping) SetMemoryStart(v uint64)

func (*Mapping) String

func (x *Mapping) String() string

type Mapping_builder

type Mapping_builder struct {

	// Address at which the binary (or DLL) is loaded into memory.
	MemoryStart uint64
	// The limit of the address range occupied by this mapping.
	MemoryLimit uint64
	// Offset in the binary that corresponds to the first mapped address.
	FileOffset uint64
	// The object this entry is loaded from.  This can be a filename on
	// disk for the main binary and shared libraries, or virtual
	// abstractions like "[vdso]".
	FilenameStrindex int32
	// References to attributes in ProfilesDictionary.attribute_table. [optional]
	AttributeIndices []int32
	// contains filtered or unexported fields
}

func (Mapping_builder) Build

func (b0 Mapping_builder) Build() *Mapping

type Profile

type Profile struct {

	// The type and unit of all Sample.values in this profile.
	// For a cpu or off-cpu profile this might be:
	//
	//	["cpu","nanoseconds"] or ["off_cpu","nanoseconds"]
	//
	// For a heap profile, this might be:
	//
	//	["allocated_objects","count"] or ["allocated_space","bytes"],
	SampleType *ValueType `protobuf:"bytes,1,opt,name=sample_type,json=sampleType,proto3" json:"sample_type,omitempty"`
	// The set of samples recorded in this profile.
	Samples []*Sample `protobuf:"bytes,2,rep,name=samples,proto3" json:"samples,omitempty"`
	// Time of collection (UTC) represented as nanoseconds past the epoch.
	TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"`
	// Duration of the profile, if a duration makes sense.
	DurationNano uint64 `protobuf:"varint,4,opt,name=duration_nano,json=durationNano,proto3" json:"duration_nano,omitempty"`
	// The kind of events between sampled occurrences.
	// e.g [ "cpu","cycles" ] or [ "heap","bytes" ]
	PeriodType *ValueType `protobuf:"bytes,5,opt,name=period_type,json=periodType,proto3" json:"period_type,omitempty"`
	// The number of events between sampled occurrences.
	Period int64 `protobuf:"varint,6,opt,name=period,proto3" json:"period,omitempty"`
	// A globally unique identifier for a profile. The ID is a 16-byte array. An ID with
	// all zeroes is considered invalid. It may be used for deduplication and signal
	// correlation purposes. It is acceptable to treat two profiles with different values
	// in this field as not equal, even if they represented the same object at an earlier
	// time.
	// This field is optional; an ID may be assigned to an ID-less profile in a later step.
	ProfileId []byte `protobuf:"bytes,7,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"`
	// The number of attributes that were discarded. Attributes
	// can be discarded because their keys are too long or because there are too many
	// attributes. If this value is 0, then no attributes were dropped.
	DroppedAttributesCount uint32 `` /* 130-byte string literal not displayed */
	// The original payload format. See also original_payload. Optional, but the
	// format and the bytes must be set or unset together.
	//
	// The allowed values for the format string are defined by the OpenTelemetry
	// specification. Some examples are "jfr", "pprof", "linux_perf".
	//
	// The original payload may be optionally provided when the conversion to the
	// OLTP format was done from a different format with some loss of the fidelity
	// and the receiver may want to store the original payload to allow future
	// lossless export or reinterpretation. Some examples of the original format
	// are JFR (Java Flight Recorder), pprof, Linux perf.
	//
	// Even when the original payload is in a format that is semantically close to
	// OTLP, such as pprof, a conversion may still be lossy in some cases (e.g. if
	// the pprof file contains custom extensions or conventions).
	//
	// The original payload can be large in size, so including the original
	// payload should be configurable by the profiler or collector options. The
	// default behavior should be to not include the original payload.
	OriginalPayloadFormat string `` /* 126-byte string literal not displayed */
	// The original payload bytes. See also original_payload_format. Optional, but
	// format and the bytes must be set or unset together.
	OriginalPayload []byte `protobuf:"bytes,10,opt,name=original_payload,json=originalPayload,proto3" json:"original_payload,omitempty"`
	// References to attributes in attribute_table. [optional]
	AttributeIndices []int32 `protobuf:"varint,11,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"`
	// contains filtered or unexported fields
}

Represents a complete profile, including sample types, samples, mappings to binaries, stacks, locations, functions, string table, and additional metadata. It modifies and annotates pprof Profile with OpenTelemetry specific fields.

Note that whilst fields in this message retain the name and field id from pprof in most cases for ease of understanding data migration, it is not intended that pprof:Profile and OpenTelemetry:Profile encoding be wire compatible.

func (*Profile) ClearPeriodType

func (x *Profile) ClearPeriodType()

func (*Profile) ClearSampleType

func (x *Profile) ClearSampleType()

func (*Profile) GetAttributeIndices

func (x *Profile) GetAttributeIndices() []int32

func (*Profile) GetDroppedAttributesCount

func (x *Profile) GetDroppedAttributesCount() uint32

func (*Profile) GetDurationNano

func (x *Profile) GetDurationNano() uint64

func (*Profile) GetOriginalPayload

func (x *Profile) GetOriginalPayload() []byte

func (*Profile) GetOriginalPayloadFormat

func (x *Profile) GetOriginalPayloadFormat() string

func (*Profile) GetPeriod

func (x *Profile) GetPeriod() int64

func (*Profile) GetPeriodType

func (x *Profile) GetPeriodType() *ValueType

func (*Profile) GetProfileId

func (x *Profile) GetProfileId() []byte

func (*Profile) GetSampleType

func (x *Profile) GetSampleType() *ValueType

func (*Profile) GetSamples

func (x *Profile) GetSamples() []*Sample

func (*Profile) GetTimeUnixNano

func (x *Profile) GetTimeUnixNano() uint64

func (*Profile) HasPeriodType

func (x *Profile) HasPeriodType() bool

func (*Profile) HasSampleType

func (x *Profile) HasSampleType() bool

func (*Profile) ProtoMessage

func (*Profile) ProtoMessage()

func (*Profile) ProtoReflect

func (x *Profile) ProtoReflect() protoreflect.Message

func (*Profile) Reset

func (x *Profile) Reset()

func (*Profile) SetAttributeIndices

func (x *Profile) SetAttributeIndices(v []int32)

func (*Profile) SetDroppedAttributesCount

func (x *Profile) SetDroppedAttributesCount(v uint32)

func (*Profile) SetDurationNano

func (x *Profile) SetDurationNano(v uint64)

func (*Profile) SetOriginalPayload

func (x *Profile) SetOriginalPayload(v []byte)

func (*Profile) SetOriginalPayloadFormat

func (x *Profile) SetOriginalPayloadFormat(v string)

func (*Profile) SetPeriod

func (x *Profile) SetPeriod(v int64)

func (*Profile) SetPeriodType

func (x *Profile) SetPeriodType(v *ValueType)

func (*Profile) SetProfileId

func (x *Profile) SetProfileId(v []byte)

func (*Profile) SetSampleType

func (x *Profile) SetSampleType(v *ValueType)

func (*Profile) SetSamples

func (x *Profile) SetSamples(v []*Sample)

func (*Profile) SetTimeUnixNano

func (x *Profile) SetTimeUnixNano(v uint64)

func (*Profile) String

func (x *Profile) String() string

type Profile_builder

type Profile_builder struct {

	// The type and unit of all Sample.values in this profile.
	// For a cpu or off-cpu profile this might be:
	//
	//	["cpu","nanoseconds"] or ["off_cpu","nanoseconds"]
	//
	// For a heap profile, this might be:
	//
	//	["allocated_objects","count"] or ["allocated_space","bytes"],
	SampleType *ValueType
	// The set of samples recorded in this profile.
	Samples []*Sample
	// Time of collection (UTC) represented as nanoseconds past the epoch.
	TimeUnixNano uint64
	// Duration of the profile, if a duration makes sense.
	DurationNano uint64
	// The kind of events between sampled occurrences.
	// e.g [ "cpu","cycles" ] or [ "heap","bytes" ]
	PeriodType *ValueType
	// The number of events between sampled occurrences.
	Period int64
	// A globally unique identifier for a profile. The ID is a 16-byte array. An ID with
	// all zeroes is considered invalid. It may be used for deduplication and signal
	// correlation purposes. It is acceptable to treat two profiles with different values
	// in this field as not equal, even if they represented the same object at an earlier
	// time.
	// This field is optional; an ID may be assigned to an ID-less profile in a later step.
	ProfileId []byte
	// The number of attributes that were discarded. Attributes
	// can be discarded because their keys are too long or because there are too many
	// attributes. If this value is 0, then no attributes were dropped.
	DroppedAttributesCount uint32
	// The original payload format. See also original_payload. Optional, but the
	// format and the bytes must be set or unset together.
	//
	// The allowed values for the format string are defined by the OpenTelemetry
	// specification. Some examples are "jfr", "pprof", "linux_perf".
	//
	// The original payload may be optionally provided when the conversion to the
	// OLTP format was done from a different format with some loss of the fidelity
	// and the receiver may want to store the original payload to allow future
	// lossless export or reinterpretation. Some examples of the original format
	// are JFR (Java Flight Recorder), pprof, Linux perf.
	//
	// Even when the original payload is in a format that is semantically close to
	// OTLP, such as pprof, a conversion may still be lossy in some cases (e.g. if
	// the pprof file contains custom extensions or conventions).
	//
	// The original payload can be large in size, so including the original
	// payload should be configurable by the profiler or collector options. The
	// default behavior should be to not include the original payload.
	OriginalPayloadFormat string
	// The original payload bytes. See also original_payload_format. Optional, but
	// format and the bytes must be set or unset together.
	OriginalPayload []byte
	// References to attributes in attribute_table. [optional]
	AttributeIndices []int32
	// contains filtered or unexported fields
}

func (Profile_builder) Build

func (b0 Profile_builder) Build() *Profile

type ProfilesData

type ProfilesData struct {

	// An array of ResourceProfiles.
	// For data coming from an SDK profiler, this array will typically contain one
	// element. Host-level profilers will usually create one ResourceProfile per
	// container, as well as one additional ResourceProfile grouping all samples
	// from non-containerized processes.
	// Other resource groupings are possible as well and clarified via
	// Resource.attributes and semantic conventions.
	// Tools that visualize profiles should prefer displaying
	// resources_profiles[0].scope_profiles[0].profiles[0] by default.
	ResourceProfiles []*ResourceProfiles `protobuf:"bytes,1,rep,name=resource_profiles,json=resourceProfiles,proto3" json:"resource_profiles,omitempty"`
	// One instance of ProfilesDictionary
	Dictionary *ProfilesDictionary `protobuf:"bytes,2,opt,name=dictionary,proto3" json:"dictionary,omitempty"`
	// contains filtered or unexported fields
}

ProfilesData represents the profiles data that can be stored in persistent storage, OR can be embedded by other protocols that transfer OTLP profiles data but do not implement the OTLP protocol.

The main difference between this message and collector protocol is that in this message there will not be any "control" or "metadata" specific to OTLP protocol.

When new fields are added into this message, the OTLP request MUST be updated as well.

func (*ProfilesData) ClearDictionary

func (x *ProfilesData) ClearDictionary()

func (*ProfilesData) GetDictionary

func (x *ProfilesData) GetDictionary() *ProfilesDictionary

func (*ProfilesData) GetResourceProfiles

func (x *ProfilesData) GetResourceProfiles() []*ResourceProfiles

func (*ProfilesData) HasDictionary

func (x *ProfilesData) HasDictionary() bool

func (*ProfilesData) ProtoMessage

func (*ProfilesData) ProtoMessage()

func (*ProfilesData) ProtoReflect

func (x *ProfilesData) ProtoReflect() protoreflect.Message

func (*ProfilesData) Reset

func (x *ProfilesData) Reset()

func (*ProfilesData) SetDictionary

func (x *ProfilesData) SetDictionary(v *ProfilesDictionary)

func (*ProfilesData) SetResourceProfiles

func (x *ProfilesData) SetResourceProfiles(v []*ResourceProfiles)

func (*ProfilesData) String

func (x *ProfilesData) String() string

type ProfilesData_builder

type ProfilesData_builder struct {

	// An array of ResourceProfiles.
	// For data coming from an SDK profiler, this array will typically contain one
	// element. Host-level profilers will usually create one ResourceProfile per
	// container, as well as one additional ResourceProfile grouping all samples
	// from non-containerized processes.
	// Other resource groupings are possible as well and clarified via
	// Resource.attributes and semantic conventions.
	// Tools that visualize profiles should prefer displaying
	// resources_profiles[0].scope_profiles[0].profiles[0] by default.
	ResourceProfiles []*ResourceProfiles
	// One instance of ProfilesDictionary
	Dictionary *ProfilesDictionary
	// contains filtered or unexported fields
}

func (ProfilesData_builder) Build

func (b0 ProfilesData_builder) Build() *ProfilesData

type ProfilesDictionary

type ProfilesDictionary struct {

	// Mappings from address ranges to the image/binary/library mapped
	// into that address range referenced by locations via Location.mapping_index.
	//
	// mapping_table[0] must always be zero value (Mapping{}) and present.
	MappingTable []*Mapping `protobuf:"bytes,1,rep,name=mapping_table,json=mappingTable,proto3" json:"mapping_table,omitempty"`
	// Locations referenced by samples via Stack.location_indices.
	//
	// location_table[0] must always be zero value (Location{}) and present.
	LocationTable []*Location `protobuf:"bytes,2,rep,name=location_table,json=locationTable,proto3" json:"location_table,omitempty"`
	// Functions referenced by locations via Line.function_index.
	//
	// function_table[0] must always be zero value (Function{}) and present.
	FunctionTable []*Function `protobuf:"bytes,3,rep,name=function_table,json=functionTable,proto3" json:"function_table,omitempty"`
	// Links referenced by samples via Sample.link_index.
	//
	// link_table[0] must always be zero value (Link{}) and present.
	LinkTable []*Link `protobuf:"bytes,4,rep,name=link_table,json=linkTable,proto3" json:"link_table,omitempty"`
	// A common table for strings referenced by various messages.
	//
	// string_table[0] must always be "" and present.
	StringTable []string `protobuf:"bytes,5,rep,name=string_table,json=stringTable,proto3" json:"string_table,omitempty"`
	// A common table for attributes referenced by the Profile, Sample, Mapping
	// and Location messages below through attribute_indices field. Each entry is
	// a key/value pair with an optional unit. Since this is a dictionary table,
	// multiple entries with the same key may be present, unlike direct attribute
	// tables like Resource.attributes. The referencing attribute_indices fields,
	// though, do maintain the key uniqueness requirement.
	//
	// It's recommended to use attributes for variables with bounded cardinality,
	// such as categorical variables
	// (https://en.wikipedia.org/wiki/Categorical_variable). Using an attribute of
	// a floating point type (e.g., CPU time) in a sample can quickly make every
	// attribute value unique, defeating the purpose of the dictionary and
	// impractically increasing the profile size.
	//
	// Examples of attributes:
	//
	//	"/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
	//	"abc.com/myattribute": true
	//	"allocation_size": 128 bytes
	//
	// attribute_table[0] must always be zero value (KeyValueAndUnit{}) and present.
	AttributeTable []*KeyValueAndUnit `protobuf:"bytes,6,rep,name=attribute_table,json=attributeTable,proto3" json:"attribute_table,omitempty"`
	// Stacks referenced by samples via Sample.stack_index.
	//
	// stack_table[0] must always be zero value (Stack{}) and present.
	StackTable []*Stack `protobuf:"bytes,7,rep,name=stack_table,json=stackTable,proto3" json:"stack_table,omitempty"`
	// contains filtered or unexported fields
}

ProfilesDictionary represents the profiles data shared across the entire message being sent. The following applies to all fields in this message:

  • A dictionary is an array of dictionary items. Users of the dictionary compactly reference the items using the index within the array.

  • A dictionary MUST have a zero value encoded as the first element. This allows for _index fields pointing into the dictionary to use a 0 pointer value to indicate 'null' / 'not set'. Unless otherwise defined, a 'zero value' message value is one with all default field values, so as to minimize wire encoded size.

  • There SHOULD NOT be dupes in a dictionary. The identity of dictionary items is based on their value, recursively as needed. If a particular implementation does emit duplicated items, it MUST NOT attempt to give them meaning based on the index or order. A profile processor may remove duplicate items and this MUST NOT have any observable effects for consumers.

  • There SHOULD NOT be orphaned (unreferenced) items in a dictionary. A profile processor may remove ("garbage-collect") orphaned items and this MUST NOT have any observable effects for consumers.

func (*ProfilesDictionary) GetAttributeTable

func (x *ProfilesDictionary) GetAttributeTable() []*KeyValueAndUnit

func (*ProfilesDictionary) GetFunctionTable

func (x *ProfilesDictionary) GetFunctionTable() []*Function

func (*ProfilesDictionary) GetLinkTable

func (x *ProfilesDictionary) GetLinkTable() []*Link

func (*ProfilesDictionary) GetLocationTable

func (x *ProfilesDictionary) GetLocationTable() []*Location

func (*ProfilesDictionary) GetMappingTable

func (x *ProfilesDictionary) GetMappingTable() []*Mapping

func (*ProfilesDictionary) GetStackTable

func (x *ProfilesDictionary) GetStackTable() []*Stack

func (*ProfilesDictionary) GetStringTable

func (x *ProfilesDictionary) GetStringTable() []string

func (*ProfilesDictionary) ProtoMessage

func (*ProfilesDictionary) ProtoMessage()

func (*ProfilesDictionary) ProtoReflect

func (x *ProfilesDictionary) ProtoReflect() protoreflect.Message

func (*ProfilesDictionary) Reset

func (x *ProfilesDictionary) Reset()

func (*ProfilesDictionary) SetAttributeTable

func (x *ProfilesDictionary) SetAttributeTable(v []*KeyValueAndUnit)

func (*ProfilesDictionary) SetFunctionTable

func (x *ProfilesDictionary) SetFunctionTable(v []*Function)

func (*ProfilesDictionary) SetLinkTable

func (x *ProfilesDictionary) SetLinkTable(v []*Link)

func (*ProfilesDictionary) SetLocationTable

func (x *ProfilesDictionary) SetLocationTable(v []*Location)

func (*ProfilesDictionary) SetMappingTable

func (x *ProfilesDictionary) SetMappingTable(v []*Mapping)

func (*ProfilesDictionary) SetStackTable

func (x *ProfilesDictionary) SetStackTable(v []*Stack)

func (*ProfilesDictionary) SetStringTable

func (x *ProfilesDictionary) SetStringTable(v []string)

func (*ProfilesDictionary) String

func (x *ProfilesDictionary) String() string

type ProfilesDictionary_builder

type ProfilesDictionary_builder struct {

	// Mappings from address ranges to the image/binary/library mapped
	// into that address range referenced by locations via Location.mapping_index.
	//
	// mapping_table[0] must always be zero value (Mapping{}) and present.
	MappingTable []*Mapping
	// Locations referenced by samples via Stack.location_indices.
	//
	// location_table[0] must always be zero value (Location{}) and present.
	LocationTable []*Location
	// Functions referenced by locations via Line.function_index.
	//
	// function_table[0] must always be zero value (Function{}) and present.
	FunctionTable []*Function
	// Links referenced by samples via Sample.link_index.
	//
	// link_table[0] must always be zero value (Link{}) and present.
	LinkTable []*Link
	// A common table for strings referenced by various messages.
	//
	// string_table[0] must always be "" and present.
	StringTable []string
	// A common table for attributes referenced by the Profile, Sample, Mapping
	// and Location messages below through attribute_indices field. Each entry is
	// a key/value pair with an optional unit. Since this is a dictionary table,
	// multiple entries with the same key may be present, unlike direct attribute
	// tables like Resource.attributes. The referencing attribute_indices fields,
	// though, do maintain the key uniqueness requirement.
	//
	// It's recommended to use attributes for variables with bounded cardinality,
	// such as categorical variables
	// (https://en.wikipedia.org/wiki/Categorical_variable). Using an attribute of
	// a floating point type (e.g., CPU time) in a sample can quickly make every
	// attribute value unique, defeating the purpose of the dictionary and
	// impractically increasing the profile size.
	//
	// Examples of attributes:
	//
	//	"/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
	//	"abc.com/myattribute": true
	//	"allocation_size": 128 bytes
	//
	// attribute_table[0] must always be zero value (KeyValueAndUnit{}) and present.
	AttributeTable []*KeyValueAndUnit
	// Stacks referenced by samples via Sample.stack_index.
	//
	// stack_table[0] must always be zero value (Stack{}) and present.
	StackTable []*Stack
	// contains filtered or unexported fields
}

func (ProfilesDictionary_builder) Build

type ResourceProfiles

type ResourceProfiles struct {

	// The resource for the profiles in this message.
	// If this field is not set then no resource info is known.
	Resource *v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// A list of ScopeProfiles that originate from a resource.
	ScopeProfiles []*ScopeProfiles `protobuf:"bytes,2,rep,name=scope_profiles,json=scopeProfiles,proto3" json:"scope_profiles,omitempty"`
	// The Schema URL, if known. This is the identifier of the Schema that the resource data
	// is recorded in. Notably, the last part of the URL path is the version number of the
	// schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
	// https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
	// This schema_url applies to the data in the "resource" field. It does not apply
	// to the data in the "scope_profiles" field which have their own schema_url field.
	SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"`
	// contains filtered or unexported fields
}

A collection of ScopeProfiles from a Resource.

func (*ResourceProfiles) ClearResource

func (x *ResourceProfiles) ClearResource()

func (*ResourceProfiles) GetResource

func (x *ResourceProfiles) GetResource() *v1.Resource

func (*ResourceProfiles) GetSchemaUrl

func (x *ResourceProfiles) GetSchemaUrl() string

func (*ResourceProfiles) GetScopeProfiles

func (x *ResourceProfiles) GetScopeProfiles() []*ScopeProfiles

func (*ResourceProfiles) HasResource

func (x *ResourceProfiles) HasResource() bool

func (*ResourceProfiles) ProtoMessage

func (*ResourceProfiles) ProtoMessage()

func (*ResourceProfiles) ProtoReflect

func (x *ResourceProfiles) ProtoReflect() protoreflect.Message

func (*ResourceProfiles) Reset

func (x *ResourceProfiles) Reset()

func (*ResourceProfiles) SetResource

func (x *ResourceProfiles) SetResource(v *v1.Resource)

func (*ResourceProfiles) SetSchemaUrl

func (x *ResourceProfiles) SetSchemaUrl(v string)

func (*ResourceProfiles) SetScopeProfiles

func (x *ResourceProfiles) SetScopeProfiles(v []*ScopeProfiles)

func (*ResourceProfiles) String

func (x *ResourceProfiles) String() string

type ResourceProfiles_builder

type ResourceProfiles_builder struct {

	// The resource for the profiles in this message.
	// If this field is not set then no resource info is known.
	Resource *v1.Resource
	// A list of ScopeProfiles that originate from a resource.
	ScopeProfiles []*ScopeProfiles
	// The Schema URL, if known. This is the identifier of the Schema that the resource data
	// is recorded in. Notably, the last part of the URL path is the version number of the
	// schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
	// https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
	// This schema_url applies to the data in the "resource" field. It does not apply
	// to the data in the "scope_profiles" field which have their own schema_url field.
	SchemaUrl string
	// contains filtered or unexported fields
}

func (ResourceProfiles_builder) Build

type Sample

type Sample struct {

	// Reference to stack in ProfilesDictionary.stack_table.
	StackIndex int32 `protobuf:"varint,1,opt,name=stack_index,json=stackIndex,proto3" json:"stack_index,omitempty"`
	// The type and unit of each value is defined by Profile.sample_type.
	Values []int64 `protobuf:"varint,2,rep,packed,name=values,proto3" json:"values,omitempty"`
	// References to attributes in ProfilesDictionary.attribute_table. [optional]
	AttributeIndices []int32 `protobuf:"varint,3,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"`
	// Reference to link in ProfilesDictionary.link_table. [optional]
	// It can be unset / set to 0 if no link exists, as link_table[0] is always a 'null' default value.
	LinkIndex int32 `protobuf:"varint,4,opt,name=link_index,json=linkIndex,proto3" json:"link_index,omitempty"`
	// Timestamps associated with Sample represented in nanoseconds. These
	// timestamps should fall within the Profile's time range.
	TimestampsUnixNano []uint64 `` /* 126-byte string literal not displayed */
	// contains filtered or unexported fields
}

Each Sample records values encountered in some program context. The program context is typically a stack trace, perhaps augmented with auxiliary information like the thread-id, some indicator of a higher level request being handled etc.

A Sample MUST have have at least one values or timestamps_unix_nano entry. If both fields are populated, they MUST contain the same number of elements, and the elements at the same index MUST refer to the same event.

Examples of different ways of representing a sample with the total value of 10:

Report of a stacktrace at 10 timestamps (consumers must assume the value is 1 for each point):

values: []
timestamps_unix_nano: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Report of a stacktrace with an aggregated value without timestamps:

values: [10]
 timestamps_unix_nano: []

Report of a stacktrace at 4 timestamps where each point records a specific value:

values: [2, 2, 3, 3]
timestamps_unix_nano: [1, 2, 3, 4]

func (*Sample) GetAttributeIndices

func (x *Sample) GetAttributeIndices() []int32

func (*Sample) GetLinkIndex

func (x *Sample) GetLinkIndex() int32

func (*Sample) GetStackIndex

func (x *Sample) GetStackIndex() int32

func (*Sample) GetTimestampsUnixNano

func (x *Sample) GetTimestampsUnixNano() []uint64

func (*Sample) GetValues

func (x *Sample) GetValues() []int64

func (*Sample) ProtoMessage

func (*Sample) ProtoMessage()

func (*Sample) ProtoReflect

func (x *Sample) ProtoReflect() protoreflect.Message

func (*Sample) Reset

func (x *Sample) Reset()

func (*Sample) SetAttributeIndices

func (x *Sample) SetAttributeIndices(v []int32)

func (*Sample) SetLinkIndex

func (x *Sample) SetLinkIndex(v int32)

func (*Sample) SetStackIndex

func (x *Sample) SetStackIndex(v int32)

func (*Sample) SetTimestampsUnixNano

func (x *Sample) SetTimestampsUnixNano(v []uint64)

func (*Sample) SetValues

func (x *Sample) SetValues(v []int64)

func (*Sample) String

func (x *Sample) String() string

type Sample_builder

type Sample_builder struct {

	// Reference to stack in ProfilesDictionary.stack_table.
	StackIndex int32
	// The type and unit of each value is defined by Profile.sample_type.
	Values []int64
	// References to attributes in ProfilesDictionary.attribute_table. [optional]
	AttributeIndices []int32
	// Reference to link in ProfilesDictionary.link_table. [optional]
	// It can be unset / set to 0 if no link exists, as link_table[0] is always a 'null' default value.
	LinkIndex int32
	// Timestamps associated with Sample represented in nanoseconds. These
	// timestamps should fall within the Profile's time range.
	TimestampsUnixNano []uint64
	// contains filtered or unexported fields
}

func (Sample_builder) Build

func (b0 Sample_builder) Build() *Sample

type ScopeProfiles

type ScopeProfiles struct {

	// The instrumentation scope information for the profiles in this message.
	// Semantically when InstrumentationScope isn't set, it is equivalent with
	// an empty instrumentation scope name (unknown).
	Scope *v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
	// A list of Profiles that originate from an instrumentation scope.
	Profiles []*Profile `protobuf:"bytes,2,rep,name=profiles,proto3" json:"profiles,omitempty"`
	// The Schema URL, if known. This is the identifier of the Schema that the profile data
	// is recorded in. Notably, the last part of the URL path is the version number of the
	// schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
	// https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
	// This schema_url applies to the data in the "scope" field and all profiles in the
	// "profiles" field.
	SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"`
	// contains filtered or unexported fields
}

A collection of Profiles produced by an InstrumentationScope.

func (*ScopeProfiles) ClearScope

func (x *ScopeProfiles) ClearScope()

func (*ScopeProfiles) GetProfiles

func (x *ScopeProfiles) GetProfiles() []*Profile

func (*ScopeProfiles) GetSchemaUrl

func (x *ScopeProfiles) GetSchemaUrl() string

func (*ScopeProfiles) GetScope

func (x *ScopeProfiles) GetScope() *v11.InstrumentationScope

func (*ScopeProfiles) HasScope

func (x *ScopeProfiles) HasScope() bool

func (*ScopeProfiles) ProtoMessage

func (*ScopeProfiles) ProtoMessage()

func (*ScopeProfiles) ProtoReflect

func (x *ScopeProfiles) ProtoReflect() protoreflect.Message

func (*ScopeProfiles) Reset

func (x *ScopeProfiles) Reset()

func (*ScopeProfiles) SetProfiles

func (x *ScopeProfiles) SetProfiles(v []*Profile)

func (*ScopeProfiles) SetSchemaUrl

func (x *ScopeProfiles) SetSchemaUrl(v string)

func (*ScopeProfiles) SetScope

func (x *ScopeProfiles) SetScope(v *v11.InstrumentationScope)

func (*ScopeProfiles) String

func (x *ScopeProfiles) String() string

type ScopeProfiles_builder

type ScopeProfiles_builder struct {

	// The instrumentation scope information for the profiles in this message.
	// Semantically when InstrumentationScope isn't set, it is equivalent with
	// an empty instrumentation scope name (unknown).
	Scope *v11.InstrumentationScope
	// A list of Profiles that originate from an instrumentation scope.
	Profiles []*Profile
	// The Schema URL, if known. This is the identifier of the Schema that the profile data
	// is recorded in. Notably, the last part of the URL path is the version number of the
	// schema: http[s]://server[:port]/path/<version>. To learn more about Schema URL see
	// https://opentelemetry.io/docs/specs/otel/schemas/#schema-url
	// This schema_url applies to the data in the "scope" field and all profiles in the
	// "profiles" field.
	SchemaUrl string
	// contains filtered or unexported fields
}

func (ScopeProfiles_builder) Build

type Stack

type Stack struct {

	// References to locations in ProfilesDictionary.location_table.
	// The first location is the leaf frame.
	LocationIndices []int32 `protobuf:"varint,1,rep,packed,name=location_indices,json=locationIndices,proto3" json:"location_indices,omitempty"`
	// contains filtered or unexported fields
}

A Stack represents a stack trace as a list of locations.

func (*Stack) GetLocationIndices

func (x *Stack) GetLocationIndices() []int32

func (*Stack) ProtoMessage

func (*Stack) ProtoMessage()

func (*Stack) ProtoReflect

func (x *Stack) ProtoReflect() protoreflect.Message

func (*Stack) Reset

func (x *Stack) Reset()

func (*Stack) SetLocationIndices

func (x *Stack) SetLocationIndices(v []int32)

func (*Stack) String

func (x *Stack) String() string

type Stack_builder

type Stack_builder struct {

	// References to locations in ProfilesDictionary.location_table.
	// The first location is the leaf frame.
	LocationIndices []int32
	// contains filtered or unexported fields
}

func (Stack_builder) Build

func (b0 Stack_builder) Build() *Stack

type ValueType

type ValueType struct {

	// Index into ProfilesDictionary.string_table.
	TypeStrindex int32 `protobuf:"varint,1,opt,name=type_strindex,json=typeStrindex,proto3" json:"type_strindex,omitempty"`
	// Index into ProfilesDictionary.string_table.
	UnitStrindex int32 `protobuf:"varint,2,opt,name=unit_strindex,json=unitStrindex,proto3" json:"unit_strindex,omitempty"`
	// contains filtered or unexported fields
}

ValueType describes the type and units of a value.

func (*ValueType) GetTypeStrindex

func (x *ValueType) GetTypeStrindex() int32

func (*ValueType) GetUnitStrindex

func (x *ValueType) GetUnitStrindex() int32

func (*ValueType) ProtoMessage

func (*ValueType) ProtoMessage()

func (*ValueType) ProtoReflect

func (x *ValueType) ProtoReflect() protoreflect.Message

func (*ValueType) Reset

func (x *ValueType) Reset()

func (*ValueType) SetTypeStrindex

func (x *ValueType) SetTypeStrindex(v int32)

func (*ValueType) SetUnitStrindex

func (x *ValueType) SetUnitStrindex(v int32)

func (*ValueType) String

func (x *ValueType) String() string

type ValueType_builder

type ValueType_builder struct {

	// Index into ProfilesDictionary.string_table.
	TypeStrindex int32
	// Index into ProfilesDictionary.string_table.
	UnitStrindex int32
	// contains filtered or unexported fields
}

func (ValueType_builder) Build

func (b0 ValueType_builder) Build() *ValueType

Source Files

  • profiles.pb.go

Jump to

Keyboard shortcuts

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