Documentation
¶
Index ¶
- Variables
- type ExpositionFormat
- func (ExpositionFormat) Descriptor() protoreflect.EnumDescriptor
- func (x ExpositionFormat) Enum() *ExpositionFormat
- func (ExpositionFormat) EnumDescriptor() ([]byte, []int)deprecated
- func (x ExpositionFormat) Number() protoreflect.EnumNumber
- func (x ExpositionFormat) String() string
- func (ExpositionFormat) Type() protoreflect.EnumType
- type LogRecord
- func (*LogRecord) Descriptor() ([]byte, []int)deprecated
- func (x *LogRecord) GetCaller() string
- func (x *LogRecord) GetEvent() string
- func (x *LogRecord) GetFields() map[string]string
- func (x *LogRecord) GetLevel() string
- func (x *LogRecord) GetMergedCount() uint32
- func (x *LogRecord) GetMessage() string
- func (x *LogRecord) GetSequence() uint64
- func (x *LogRecord) GetTimeUnixNano() int64
- func (*LogRecord) ProtoMessage()
- func (x *LogRecord) ProtoReflect() protoreflect.Message
- func (x *LogRecord) Reset()
- func (x *LogRecord) String() string
- type LogReport
- func (*LogReport) Descriptor() ([]byte, []int)deprecated
- func (x *LogReport) GetBootId() string
- func (x *LogReport) GetInstanceId() string
- func (x *LogReport) GetNodeId() string
- func (x *LogReport) GetRecords() []*LogRecord
- func (x *LogReport) GetServiceName() string
- func (*LogReport) ProtoMessage()
- func (x *LogReport) ProtoReflect() protoreflect.Message
- func (x *LogReport) Reset()
- func (x *LogReport) String() string
- type MetricReport
- func (*MetricReport) Descriptor() ([]byte, []int)deprecated
- func (x *MetricReport) GetBootId() string
- func (x *MetricReport) GetInstanceId() string
- func (x *MetricReport) GetNodeId() string
- func (x *MetricReport) GetSequence() uint64
- func (x *MetricReport) GetServiceName() string
- func (x *MetricReport) GetServiceVersion() string
- func (x *MetricReport) GetSnapshot() *MetricSnapshot
- func (*MetricReport) ProtoMessage()
- func (x *MetricReport) ProtoReflect() protoreflect.Message
- func (x *MetricReport) Reset()
- func (x *MetricReport) String() string
- type MetricSnapshot
- func (*MetricSnapshot) Descriptor() ([]byte, []int)deprecated
- func (x *MetricSnapshot) GetCollectionIntervalSeconds() uint32
- func (x *MetricSnapshot) GetData() []byte
- func (x *MetricSnapshot) GetDataSha256() []byte
- func (x *MetricSnapshot) GetFormat() ExpositionFormat
- func (x *MetricSnapshot) GetMetricFamilyCount() uint32
- func (x *MetricSnapshot) GetSampleCount() uint32
- func (x *MetricSnapshot) GetSchemaVersion() uint32
- func (*MetricSnapshot) ProtoMessage()
- func (x *MetricSnapshot) ProtoReflect() protoreflect.Message
- func (x *MetricSnapshot) Reset()
- func (x *MetricSnapshot) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ExpositionFormat_name = map[int32]string{ 0: "EXPOSITION_FORMAT_UNSPECIFIED", 1: "EXPOSITION_FORMAT_PROMETHEUS_TEXT", } ExpositionFormat_value = map[string]int32{ "EXPOSITION_FORMAT_UNSPECIFIED": 0, "EXPOSITION_FORMAT_PROMETHEUS_TEXT": 1, } )
Enum value maps for ExpositionFormat.
View Source
var File_metrics_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ExpositionFormat ¶
type ExpositionFormat int32
const ( ExpositionFormat_EXPOSITION_FORMAT_UNSPECIFIED ExpositionFormat = 0 ExpositionFormat_EXPOSITION_FORMAT_PROMETHEUS_TEXT ExpositionFormat = 1 )
func (ExpositionFormat) Descriptor ¶
func (ExpositionFormat) Descriptor() protoreflect.EnumDescriptor
func (ExpositionFormat) Enum ¶
func (x ExpositionFormat) Enum() *ExpositionFormat
func (ExpositionFormat) EnumDescriptor
deprecated
func (ExpositionFormat) EnumDescriptor() ([]byte, []int)
Deprecated: Use ExpositionFormat.Descriptor instead.
func (ExpositionFormat) Number ¶
func (x ExpositionFormat) Number() protoreflect.EnumNumber
func (ExpositionFormat) String ¶
func (x ExpositionFormat) String() string
func (ExpositionFormat) Type ¶
func (ExpositionFormat) Type() protoreflect.EnumType
type LogRecord ¶
type LogRecord struct {
// sequence 在一次进程启动内递增,和 LogReport 的 boot_id 一起唯一确定一条记录(重复投递靠它去重)。
Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
TimeUnixNano int64 `protobuf:"varint,2,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"`
// level:debug、info、warn、error、fatal。
Level string `protobuf:"bytes,3,opt,name=level,proto3" json:"level,omitempty"`
// event 是关键事件的名称;普通的错误日志为空。
Event string `protobuf:"bytes,4,opt,name=event,proto3" json:"event,omitempty"`
Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
// caller 是打日志的代码位置(包/文件:行号)。
Caller string `protobuf:"bytes,6,opt,name=caller,proto3" json:"caller,omitempty"`
// fields 是日志带的结构化字段,值一律转成字符串。
Fields map[string]string `` /* 153-byte string literal not displayed */
// merged_count 大于 0 表示在这条之前,同一代码位置另有这么多条日志因为太密被合并掉了。
MergedCount uint32 `protobuf:"varint,8,opt,name=merged_count,json=mergedCount,proto3" json:"merged_count,omitempty"`
// contains filtered or unexported fields
}
LogRecord 是一条重要日志:Error 及以上级别,或代码里显式标出的关键事件。
func (*LogRecord) Descriptor
deprecated
func (*LogRecord) GetMergedCount ¶
func (*LogRecord) GetMessage ¶
func (*LogRecord) GetSequence ¶
func (*LogRecord) GetTimeUnixNano ¶
func (*LogRecord) ProtoMessage ¶
func (*LogRecord) ProtoMessage()
func (*LogRecord) ProtoReflect ¶
func (x *LogRecord) ProtoReflect() protoreflect.Message
type LogReport ¶
type LogReport struct {
ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
InstanceId string `protobuf:"bytes,2,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
NodeId string `protobuf:"bytes,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
BootId string `protobuf:"bytes,4,opt,name=boot_id,json=bootId,proto3" json:"boot_id,omitempty"`
Records []*LogRecord `protobuf:"bytes,5,rep,name=records,proto3" json:"records,omitempty"`
// contains filtered or unexported fields
}
LogReport 是一个进程上报的一批重要日志。
func (*LogReport) Descriptor
deprecated
func (*LogReport) GetInstanceId ¶
func (*LogReport) GetRecords ¶
func (*LogReport) GetServiceName ¶
func (*LogReport) ProtoMessage ¶
func (*LogReport) ProtoMessage()
func (*LogReport) ProtoReflect ¶
func (x *LogReport) ProtoReflect() protoreflect.Message
type MetricReport ¶
type MetricReport struct {
ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
InstanceId string `protobuf:"bytes,2,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
NodeId string `protobuf:"bytes,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
BootId string `protobuf:"bytes,4,opt,name=boot_id,json=bootId,proto3" json:"boot_id,omitempty"`
ServiceVersion string `protobuf:"bytes,5,opt,name=service_version,json=serviceVersion,proto3" json:"service_version,omitempty"`
Sequence uint64 `protobuf:"varint,6,opt,name=sequence,proto3" json:"sequence,omitempty"`
Snapshot *MetricSnapshot `protobuf:"bytes,7,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
// contains filtered or unexported fields
}
func (*MetricReport) Descriptor
deprecated
func (*MetricReport) Descriptor() ([]byte, []int)
Deprecated: Use MetricReport.ProtoReflect.Descriptor instead.
func (*MetricReport) GetBootId ¶
func (x *MetricReport) GetBootId() string
func (*MetricReport) GetInstanceId ¶
func (x *MetricReport) GetInstanceId() string
func (*MetricReport) GetNodeId ¶
func (x *MetricReport) GetNodeId() string
func (*MetricReport) GetSequence ¶
func (x *MetricReport) GetSequence() uint64
func (*MetricReport) GetServiceName ¶
func (x *MetricReport) GetServiceName() string
func (*MetricReport) GetServiceVersion ¶
func (x *MetricReport) GetServiceVersion() string
func (*MetricReport) GetSnapshot ¶
func (x *MetricReport) GetSnapshot() *MetricSnapshot
func (*MetricReport) ProtoMessage ¶
func (*MetricReport) ProtoMessage()
func (*MetricReport) ProtoReflect ¶
func (x *MetricReport) ProtoReflect() protoreflect.Message
func (*MetricReport) Reset ¶
func (x *MetricReport) Reset()
func (*MetricReport) String ¶
func (x *MetricReport) String() string
type MetricSnapshot ¶
type MetricSnapshot struct {
SchemaVersion uint32 `protobuf:"varint,1,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"`
CollectionIntervalSeconds uint32 `` /* 139-byte string literal not displayed */
Format ExpositionFormat `protobuf:"varint,3,opt,name=format,proto3,enum=trpc.moox.metrics.ExpositionFormat" json:"format,omitempty"`
// data 是 Prometheus 文本原文;传输压缩由事件信封层统一完成。
Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
MetricFamilyCount uint32 `protobuf:"varint,5,opt,name=metric_family_count,json=metricFamilyCount,proto3" json:"metric_family_count,omitempty"`
SampleCount uint32 `protobuf:"varint,6,opt,name=sample_count,json=sampleCount,proto3" json:"sample_count,omitempty"`
DataSha256 []byte `protobuf:"bytes,7,opt,name=data_sha256,json=dataSha256,proto3" json:"data_sha256,omitempty"`
// contains filtered or unexported fields
}
func (*MetricSnapshot) Descriptor
deprecated
func (*MetricSnapshot) Descriptor() ([]byte, []int)
Deprecated: Use MetricSnapshot.ProtoReflect.Descriptor instead.
func (*MetricSnapshot) GetCollectionIntervalSeconds ¶
func (x *MetricSnapshot) GetCollectionIntervalSeconds() uint32
func (*MetricSnapshot) GetData ¶
func (x *MetricSnapshot) GetData() []byte
func (*MetricSnapshot) GetDataSha256 ¶
func (x *MetricSnapshot) GetDataSha256() []byte
func (*MetricSnapshot) GetFormat ¶
func (x *MetricSnapshot) GetFormat() ExpositionFormat
func (*MetricSnapshot) GetMetricFamilyCount ¶
func (x *MetricSnapshot) GetMetricFamilyCount() uint32
func (*MetricSnapshot) GetSampleCount ¶
func (x *MetricSnapshot) GetSampleCount() uint32
func (*MetricSnapshot) GetSchemaVersion ¶
func (x *MetricSnapshot) GetSchemaVersion() uint32
func (*MetricSnapshot) ProtoMessage ¶
func (*MetricSnapshot) ProtoMessage()
func (*MetricSnapshot) ProtoReflect ¶
func (x *MetricSnapshot) ProtoReflect() protoreflect.Message
func (*MetricSnapshot) Reset ¶
func (x *MetricSnapshot) Reset()
func (*MetricSnapshot) String ¶
func (x *MetricSnapshot) String() string
Click to show internal directories.
Click to hide internal directories.