v3

package
v0.0.0-...-6cb6b35 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_logging_Logging_proto protoreflect.FileDescriptor

Functions

func RegisterLogReportServiceServer

func RegisterLogReportServiceServer(s grpc.ServiceRegistrar, srv LogReportServiceServer)

Types

type JSONLog

type JSONLog struct {
	Json string `protobuf:"bytes,1,opt,name=json,proto3" json:"json,omitempty"`
	// contains filtered or unexported fields
}

JSON formatted log. The json field represents the string that could be formatted as a JSON object.

func (*JSONLog) Descriptor deprecated

func (*JSONLog) Descriptor() ([]byte, []int)

Deprecated: Use JSONLog.ProtoReflect.Descriptor instead.

func (*JSONLog) GetJson

func (x *JSONLog) GetJson() string

func (*JSONLog) ProtoMessage

func (*JSONLog) ProtoMessage()

func (*JSONLog) ProtoReflect

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

func (*JSONLog) Reset

func (x *JSONLog) Reset()

func (*JSONLog) String

func (x *JSONLog) String() string

type LogData

type LogData struct {

	// [Optional] The timestamp of the log, in millisecond.
	// If not set, OAP server would use the received timestamp as log's timestamp,
	// or relies on the OAP server analyzer.
	Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// [Required] **Service**. Represents a set/group of workloads which provide
	// the same behaviours for incoming requests.
	//
	// The logic name represents the service. This would show as a separate node
	// in the topology. The metrics analyzed from the spans, would be aggregated
	// for this entity as the service level.
	//
	// If this is not the first element of the streaming, use the previous
	// not-null name as the service name.
	Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
	// [Optional] **Service Instance**. Each individual workload in the Service
	// group is known as an instance. Like `pods` in Kubernetes, it doesn't need
	// to be a single OS process, however, if you are using instrument agents, an
	// instance is actually a real OS process.
	//
	// The logic name represents the service instance. This would show as a
	// separate node in the instance relationship. The metrics analyzed from the
	// spans, would be aggregated for this entity as the service instance level.
	ServiceInstance string `protobuf:"bytes,3,opt,name=serviceInstance,proto3" json:"serviceInstance,omitempty"`
	// [Optional] **Endpoint**. A path in a service for incoming requests, such as
	// an HTTP URI path or a gRPC service class + method signature.
	//
	// The logic name represents the endpoint, which logs belong.
	Endpoint string `protobuf:"bytes,4,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// [Required] The content of the log.
	Body *LogDataBody `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
	// [Optional] Logs with trace context
	TraceContext *TraceContext `protobuf:"bytes,6,opt,name=traceContext,proto3" json:"traceContext,omitempty"`
	// [Optional] The available tags. OAP server could provide search/analysis
	// capabilities based on these.
	Tags *LogTags `protobuf:"bytes,7,opt,name=tags,proto3" json:"tags,omitempty"`
	// [Optional] Since 9.0.0
	// The layer of the service and servce instance. If absent, the OAP would set
	// `layer`=`ID: 2, NAME: general`
	Layer string `protobuf:"bytes,8,opt,name=layer,proto3" json:"layer,omitempty"`
	// contains filtered or unexported fields
}

Log data is collected through file scratcher of agent. Natively, Satellite provides various ways to collect logs.

func (*LogData) Descriptor deprecated

func (*LogData) Descriptor() ([]byte, []int)

Deprecated: Use LogData.ProtoReflect.Descriptor instead.

func (*LogData) GetBody

func (x *LogData) GetBody() *LogDataBody

func (*LogData) GetEndpoint

func (x *LogData) GetEndpoint() string

func (*LogData) GetLayer

func (x *LogData) GetLayer() string

func (*LogData) GetService

func (x *LogData) GetService() string

func (*LogData) GetServiceInstance

func (x *LogData) GetServiceInstance() string

func (*LogData) GetTags

func (x *LogData) GetTags() *LogTags

func (*LogData) GetTimestamp

func (x *LogData) GetTimestamp() int64

func (*LogData) GetTraceContext

func (x *LogData) GetTraceContext() *TraceContext

func (*LogData) ProtoMessage

func (*LogData) ProtoMessage()

func (*LogData) ProtoReflect

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

func (*LogData) Reset

func (x *LogData) Reset()

func (*LogData) String

func (x *LogData) String() string

type LogDataBody

type LogDataBody struct {

	// A type to match analyzer(s) at the OAP server.
	// The data could be analyzed at the client side, but could be partial
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	// Content with extendable format.
	//
	// Types that are assignable to Content:
	//	*LogDataBody_Text
	//	*LogDataBody_Json
	//	*LogDataBody_Yaml
	Content isLogDataBody_Content `protobuf_oneof:"content"`
	// contains filtered or unexported fields
}

The content of the log data

func (*LogDataBody) Descriptor deprecated

func (*LogDataBody) Descriptor() ([]byte, []int)

Deprecated: Use LogDataBody.ProtoReflect.Descriptor instead.

func (*LogDataBody) GetContent

func (m *LogDataBody) GetContent() isLogDataBody_Content

func (*LogDataBody) GetJson

func (x *LogDataBody) GetJson() *JSONLog

func (*LogDataBody) GetText

func (x *LogDataBody) GetText() *TextLog

func (*LogDataBody) GetType

func (x *LogDataBody) GetType() string

func (*LogDataBody) GetYaml

func (x *LogDataBody) GetYaml() *YAMLLog

func (*LogDataBody) ProtoMessage

func (*LogDataBody) ProtoMessage()

func (*LogDataBody) ProtoReflect

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

func (*LogDataBody) Reset

func (x *LogDataBody) Reset()

func (*LogDataBody) String

func (x *LogDataBody) String() string

type LogDataBody_Json

type LogDataBody_Json struct {
	Json *JSONLog `protobuf:"bytes,3,opt,name=json,proto3,oneof"`
}

type LogDataBody_Text

type LogDataBody_Text struct {
	Text *TextLog `protobuf:"bytes,2,opt,name=text,proto3,oneof"`
}

type LogDataBody_Yaml

type LogDataBody_Yaml struct {
	Yaml *YAMLLog `protobuf:"bytes,4,opt,name=yaml,proto3,oneof"`
}

type LogReportServiceClient

type LogReportServiceClient interface {
	// Recommend to report log data in a stream mode.
	// The service/instance/endpoint of the log could share the previous value if
	// they are not set. Reporting the logs of same service in the batch mode
	// could reduce the network cost.
	Collect(ctx context.Context, opts ...grpc.CallOption) (LogReportService_CollectClient, error)
}

LogReportServiceClient is the client API for LogReportService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type LogReportServiceServer

type LogReportServiceServer interface {
	// Recommend to report log data in a stream mode.
	// The service/instance/endpoint of the log could share the previous value if
	// they are not set. Reporting the logs of same service in the batch mode
	// could reduce the network cost.
	Collect(LogReportService_CollectServer) error
	// contains filtered or unexported methods
}

LogReportServiceServer is the server API for LogReportService service. All implementations must embed UnimplementedLogReportServiceServer for forward compatibility

type LogReportService_CollectClient

type LogReportService_CollectClient interface {
	Send(*LogData) error
	CloseAndRecv() (*v3.Commands, error)
	grpc.ClientStream
}

type LogReportService_CollectServer

type LogReportService_CollectServer interface {
	SendAndClose(*v3.Commands) error
	Recv() (*LogData, error)
	grpc.ServerStream
}

type LogTags

type LogTags struct {

	// String key, String value pair.
	Data []*v3.KeyStringValuePair `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*LogTags) Descriptor deprecated

func (*LogTags) Descriptor() ([]byte, []int)

Deprecated: Use LogTags.ProtoReflect.Descriptor instead.

func (*LogTags) GetData

func (x *LogTags) GetData() []*v3.KeyStringValuePair

func (*LogTags) ProtoMessage

func (*LogTags) ProtoMessage()

func (*LogTags) ProtoReflect

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

func (*LogTags) Reset

func (x *LogTags) Reset()

func (*LogTags) String

func (x *LogTags) String() string

type TextLog

type TextLog struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

Literal text log, typically requires regex or split mechanism to filter meaningful info.

func (*TextLog) Descriptor deprecated

func (*TextLog) Descriptor() ([]byte, []int)

Deprecated: Use TextLog.ProtoReflect.Descriptor instead.

func (*TextLog) GetText

func (x *TextLog) GetText() string

func (*TextLog) ProtoMessage

func (*TextLog) ProtoMessage()

func (*TextLog) ProtoReflect

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

func (*TextLog) Reset

func (x *TextLog) Reset()

func (*TextLog) String

func (x *TextLog) String() string

type TraceContext

type TraceContext struct {

	// [Optional] A string id represents the whole trace.
	TraceId string `protobuf:"bytes,1,opt,name=traceId,proto3" json:"traceId,omitempty"`
	// [Optional] A unique id represents this segment. Other segments could use
	// this id to reference as a child segment.
	TraceSegmentId string `protobuf:"bytes,2,opt,name=traceSegmentId,proto3" json:"traceSegmentId,omitempty"`
	// [Optional] The number id of the span. Should be unique in the whole
	// segment. Starting at 0.
	SpanId int32 `protobuf:"varint,3,opt,name=spanId,proto3" json:"spanId,omitempty"`
	// contains filtered or unexported fields
}

Logs with trace context, represent agent system has injects context(IDs) into log text.

func (*TraceContext) Descriptor deprecated

func (*TraceContext) Descriptor() ([]byte, []int)

Deprecated: Use TraceContext.ProtoReflect.Descriptor instead.

func (*TraceContext) GetSpanId

func (x *TraceContext) GetSpanId() int32

func (*TraceContext) GetTraceId

func (x *TraceContext) GetTraceId() string

func (*TraceContext) GetTraceSegmentId

func (x *TraceContext) GetTraceSegmentId() string

func (*TraceContext) ProtoMessage

func (*TraceContext) ProtoMessage()

func (*TraceContext) ProtoReflect

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

func (*TraceContext) Reset

func (x *TraceContext) Reset()

func (*TraceContext) String

func (x *TraceContext) String() string

type UnimplementedLogReportServiceServer

type UnimplementedLogReportServiceServer struct {
}

UnimplementedLogReportServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedLogReportServiceServer) Collect

type UnsafeLogReportServiceServer

type UnsafeLogReportServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeLogReportServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LogReportServiceServer will result in compilation errors.

type YAMLLog

type YAMLLog struct {
	Yaml string `protobuf:"bytes,1,opt,name=yaml,proto3" json:"yaml,omitempty"`
	// contains filtered or unexported fields
}

YAML formatted log. The yaml field represents the string that could be formatted as a YAML map.

func (*YAMLLog) Descriptor deprecated

func (*YAMLLog) Descriptor() ([]byte, []int)

Deprecated: Use YAMLLog.ProtoReflect.Descriptor instead.

func (*YAMLLog) GetYaml

func (x *YAMLLog) GetYaml() string

func (*YAMLLog) ProtoMessage

func (*YAMLLog) ProtoMessage()

func (*YAMLLog) ProtoReflect

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

func (*YAMLLog) Reset

func (x *YAMLLog) Reset()

func (*YAMLLog) String

func (x *YAMLLog) String() string

Jump to

Keyboard shortcuts

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