telemetry

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: Apache-2.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

View Source
const HeartbeatInterval = 30 * time.Second
View Source
const (
	LogsSource_Subscribe_FullMethodName = "/telemetry.LogsSource/Subscribe"
)
View Source
const (
	MetricsSource_Subscribe_FullMethodName = "/telemetry.MetricsSource/Subscribe"
)
View Source
const (
	TracesSource_Subscribe_FullMethodName = "/telemetry.TracesSource/Subscribe"
)

Variables

View Source
var File_servers_proto protoreflect.FileDescriptor
View Source
var LogsSource_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "telemetry.LogsSource",
	HandlerType: (*LogsSourceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _LogsSource_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "servers.proto",
}

LogsSource_ServiceDesc is the grpc.ServiceDesc for LogsSource service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var MetricsSource_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "telemetry.MetricsSource",
	HandlerType: (*MetricsSourceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _MetricsSource_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "servers.proto",
}

MetricsSource_ServiceDesc is the grpc.ServiceDesc for MetricsSource service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var TracesSource_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "telemetry.TracesSource",
	HandlerType: (*TracesSourceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _TracesSource_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "servers.proto",
}

TracesSource_ServiceDesc is the grpc.ServiceDesc for TracesSource service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func ConfiguredCloudExporters

func ConfiguredCloudExporters(ctx context.Context) (sdktrace.SpanExporter, sdklog.Exporter, bool)

func MeasuringStreamClientInterceptor

func MeasuringStreamClientInterceptor() grpc.StreamClientInterceptor

func MeasuringUnaryClientInterceptor

func MeasuringUnaryClientInterceptor() grpc.UnaryClientInterceptor

func MeasuringUnaryServerInterceptor

func MeasuringUnaryServerInterceptor() grpc.UnaryServerInterceptor

func RegisterLogsSourceServer

func RegisterLogsSourceServer(s grpc.ServiceRegistrar, srv LogsSourceServer)

func RegisterMetricsSourceServer

func RegisterMetricsSourceServer(s grpc.ServiceRegistrar, srv MetricsSourceServer)

func RegisterTracesSourceServer

func RegisterTracesSourceServer(s grpc.ServiceRegistrar, srv TracesSourceServer)

func URLForTrace

func URLForTrace(ctx context.Context) (url string, msg string, ok bool)

Types

type LabelFlag

type LabelFlag struct {
	Labels
}

func NewLabelFlag

func NewLabelFlag() LabelFlag

func (LabelFlag) Set

func (flag LabelFlag) Set(s string) error

func (LabelFlag) String

func (flag LabelFlag) String() string

func (LabelFlag) Type

func (flag LabelFlag) Type() string

type Labels

type Labels map[string]string

func LoadDefaultLabels

func LoadDefaultLabels(workdir, clientEngineVersion string) Labels

func (*Labels) UnmarshalJSON

func (labels *Labels) UnmarshalJSON(dt []byte) error

func (Labels) UserAgent

func (labels Labels) UserAgent() string

func (Labels) WithAnonymousGitLabels

func (labels Labels) WithAnonymousGitLabels(workdir string) Labels

func (Labels) WithCILabels

func (labels Labels) WithCILabels() Labels

func (Labels) WithCircleCILabels

func (labels Labels) WithCircleCILabels() Labels

func (Labels) WithClientLabels

func (labels Labels) WithClientLabels(engineVersion string) Labels

func (Labels) WithEngineLabel

func (labels Labels) WithEngineLabel(engineName string) Labels

func (Labels) WithGitHubLabels

func (labels Labels) WithGitHubLabels() Labels

func (Labels) WithGitLabLabels

func (labels Labels) WithGitLabLabels() Labels

func (Labels) WithGitLabels

func (labels Labels) WithGitLabels(workdir string) Labels

func (Labels) WithJenkinsLabels added in v0.12.0

func (labels Labels) WithJenkinsLabels() Labels

func (Labels) WithServerLabels

func (labels Labels) WithServerLabels(engineVersion, os, arch string, cacheEnabled bool) Labels

func (Labels) WithVCSLabels

func (labels Labels) WithVCSLabels(workdir string) Labels

type LogsPubSub

type LogsPubSub struct {
	*PubSub
}

func (LogsPubSub) Export

func (ps LogsPubSub) Export(ctx context.Context, logs []sdklog.Record) error

type LogsSourceClient

type LogsSourceClient interface {
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (LogsSource_SubscribeClient, error)
}

LogsSourceClient is the client API for LogsSource 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.

func NewLogsSourceClient

func NewLogsSourceClient(cc grpc.ClientConnInterface) LogsSourceClient

type LogsSourceServer

type LogsSourceServer interface {
	Subscribe(*SubscribeRequest, LogsSource_SubscribeServer) error
	// contains filtered or unexported methods
}

LogsSourceServer is the server API for LogsSource service. All implementations must embed UnimplementedLogsSourceServer for forward compatibility

type LogsSource_SubscribeClient

type LogsSource_SubscribeClient interface {
	Recv() (*v11.LogsData, error)
	grpc.ClientStream
}

type LogsSource_SubscribeServer

type LogsSource_SubscribeServer interface {
	Send(*v11.LogsData) error
	grpc.ServerStream
}

type MetricsPubSub

type MetricsPubSub struct {
	*PubSub
}

func (MetricsPubSub) Aggregation

func (MetricsPubSub) Export

func (ps MetricsPubSub) Export(ctx context.Context, metrics *metricdata.ResourceMetrics) error

func (MetricsPubSub) MetricSubscribers

func (ps MetricsPubSub) MetricSubscribers(topic Topic) []sdkmetric.Exporter

func (MetricsPubSub) Temporality

type MetricsSourceClient

type MetricsSourceClient interface {
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (MetricsSource_SubscribeClient, error)
}

MetricsSourceClient is the client API for MetricsSource 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 MetricsSourceServer

type MetricsSourceServer interface {
	Subscribe(*SubscribeRequest, MetricsSource_SubscribeServer) error
	// contains filtered or unexported methods
}

MetricsSourceServer is the server API for MetricsSource service. All implementations must embed UnimplementedMetricsSourceServer for forward compatibility

type MetricsSource_SubscribeClient

type MetricsSource_SubscribeClient interface {
	Recv() (*v12.MetricsData, error)
	grpc.ClientStream
}

type MetricsSource_SubscribeServer

type MetricsSource_SubscribeServer interface {
	Send(*v12.MetricsData) error
	grpc.ServerStream
}

type PubSub

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

func NewPubSub

func NewPubSub() *PubSub

func (*PubSub) Drain

func (ps *PubSub) Drain(client string, immediate bool)

func (*PubSub) ForceFlush

func (ps *PubSub) ForceFlush(ctx context.Context) error

NB: this is part of the Metrics exporter interface only for some reason, but it would be the same signature across the others too anyway.

func (*PubSub) LogSubscribers

func (ps *PubSub) LogSubscribers(topic Topic) []sdklog.Exporter

func (*PubSub) Logs

func (ps *PubSub) Logs() sdklog.Exporter

func (*PubSub) LogsHandler

func (ps *PubSub) LogsHandler(rw http.ResponseWriter, r *http.Request)

func (*PubSub) Metrics

func (ps *PubSub) Metrics() sdkmetric.Exporter

func (*PubSub) MetricsHandler

func (ps *PubSub) MetricsHandler(rw http.ResponseWriter, r *http.Request)

func (*PubSub) Processor

func (ps *PubSub) Processor() sdktrace.SpanProcessor

Processor returns a span processor that keeps track of client IDs, inheriting them from parent spans if needed.

func (*PubSub) ServeHTTP

func (ps *PubSub) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*PubSub) Shutdown

func (ps *PubSub) Shutdown(ctx context.Context) error

func (*PubSub) SpanSubscribers

func (ps *PubSub) SpanSubscribers(topic Topic) []sdktrace.SpanExporter

func (*PubSub) Spans

func (ps *PubSub) Spans() sdktrace.SpanExporter

func (*PubSub) SubscribeToLogs

func (ps *PubSub) SubscribeToLogs(ctx context.Context, topic Topic, exp sdklog.Exporter) error

func (*PubSub) SubscribeToSpans

func (ps *PubSub) SubscribeToSpans(ctx context.Context, topic Topic, exp sdktrace.SpanExporter) error

func (*PubSub) TracesHandler

func (ps *PubSub) TracesHandler(rw http.ResponseWriter, r *http.Request)

type SpanHeartbeater

type SpanHeartbeater struct {
	sdktrace.SpanExporter
	// contains filtered or unexported fields
}

SpanHeartbeater is a SpanExporter that keeps track of live spans and re-exports them periodically to the underlying SpanExporter to indicate that they are indeed still live.

func NewSpanHeartbeater

func NewSpanHeartbeater(exp sdktrace.SpanExporter) *SpanHeartbeater

func (*SpanHeartbeater) ExportSpans

func (p *SpanHeartbeater) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) error

func (*SpanHeartbeater) Shutdown

func (p *SpanHeartbeater) Shutdown(ctx context.Context) error

type SpansPubSub

type SpansPubSub struct {
	*PubSub
}

func (SpansPubSub) ExportSpans

func (ps SpansPubSub) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) error

type SubscribeRequest

type SubscribeRequest struct {
	TraceId  []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
	ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeRequest) Descriptor deprecated

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

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) GetClientId

func (x *SubscribeRequest) GetClientId() string

func (*SubscribeRequest) GetTraceId

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

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

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

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type Topic

type Topic struct {
	TraceID  trace.TraceID
	ClientID string
}

func (Topic) String

func (t Topic) String() string

type TracesSourceClient

type TracesSourceClient interface {
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (TracesSource_SubscribeClient, error)
}

TracesSourceClient is the client API for TracesSource 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 TracesSourceServer

type TracesSourceServer interface {
	Subscribe(*SubscribeRequest, TracesSource_SubscribeServer) error
	// contains filtered or unexported methods
}

TracesSourceServer is the server API for TracesSource service. All implementations must embed UnimplementedTracesSourceServer for forward compatibility

type TracesSource_SubscribeClient

type TracesSource_SubscribeClient interface {
	Recv() (*v1.TracesData, error)
	grpc.ClientStream
}

type TracesSource_SubscribeServer

type TracesSource_SubscribeServer interface {
	Send(*v1.TracesData) error
	grpc.ServerStream
}

type UnimplementedLogsSourceServer

type UnimplementedLogsSourceServer struct {
}

UnimplementedLogsSourceServer must be embedded to have forward compatible implementations.

func (UnimplementedLogsSourceServer) Subscribe

type UnimplementedMetricsSourceServer

type UnimplementedMetricsSourceServer struct {
}

UnimplementedMetricsSourceServer must be embedded to have forward compatible implementations.

func (UnimplementedMetricsSourceServer) Subscribe

type UnimplementedTracesSourceServer

type UnimplementedTracesSourceServer struct {
}

UnimplementedTracesSourceServer must be embedded to have forward compatible implementations.

func (UnimplementedTracesSourceServer) Subscribe

type UnsafeLogsSourceServer

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

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

type UnsafeMetricsSourceServer

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

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

type UnsafeTracesSourceServer

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

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

Jump to

Keyboard shortcuts

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