Documentation ¶
Index ¶
- Constants
- Variables
- func ConfiguredCloudExporters(ctx context.Context) (sdktrace.SpanExporter, sdklog.Exporter, bool)
- func MeasuringStreamClientInterceptor() grpc.StreamClientInterceptor
- func MeasuringUnaryClientInterceptor() grpc.UnaryClientInterceptor
- func MeasuringUnaryServerInterceptor() grpc.UnaryServerInterceptor
- func RegisterLogsSourceServer(s grpc.ServiceRegistrar, srv LogsSourceServer)
- func RegisterMetricsSourceServer(s grpc.ServiceRegistrar, srv MetricsSourceServer)
- func RegisterTracesSourceServer(s grpc.ServiceRegistrar, srv TracesSourceServer)
- func URLForTrace(ctx context.Context) (url string, msg string, ok bool)
- type LabelFlag
- type Labels
- func (labels *Labels) UnmarshalJSON(dt []byte) error
- func (labels Labels) UserAgent() string
- func (labels Labels) WithAnonymousGitLabels(workdir string) Labels
- func (labels Labels) WithCILabels() Labels
- func (labels Labels) WithCircleCILabels() Labels
- func (labels Labels) WithClientLabels(engineVersion string) Labels
- func (labels Labels) WithEngineLabel(engineName string) Labels
- func (labels Labels) WithGitHubLabels() Labels
- func (labels Labels) WithGitLabLabels() Labels
- func (labels Labels) WithGitLabels(workdir string) Labels
- func (labels Labels) WithServerLabels(engineVersion, os, arch string, cacheEnabled bool) Labels
- func (labels Labels) WithVCSLabels(workdir string) Labels
- type LogsPubSub
- type LogsServer
- type LogsSourceClient
- type LogsSourceServer
- type LogsSource_SubscribeClient
- type LogsSource_SubscribeServer
- type MetricsPubSub
- func (ps MetricsPubSub) Aggregation(kind sdkmetric.InstrumentKind) sdkmetric.Aggregation
- func (ps MetricsPubSub) Export(ctx context.Context, metrics *metricdata.ResourceMetrics) error
- func (ps MetricsPubSub) MetricSubscribers(topic Topic) []sdkmetric.Exporter
- func (ps MetricsPubSub) Temporality(kind sdkmetric.InstrumentKind) metricdata.Temporality
- type MetricsServer
- type MetricsSourceClient
- type MetricsSourceServer
- type MetricsSource_SubscribeClient
- type MetricsSource_SubscribeServer
- type PubSub
- func (ps *PubSub) ClientDisconnected(clientID string)
- func (ps *PubSub) Drain(client string, immediate bool)
- func (ps *PubSub) ForceFlush(ctx context.Context) error
- func (ps *PubSub) LogSubscribers(topic Topic) []sdklog.Exporter
- func (ps *PubSub) Logs() sdklog.Exporter
- func (ps *PubSub) LogsHandler(rw http.ResponseWriter, r *http.Request)
- func (ps *PubSub) Metrics() sdkmetric.Exporter
- func (ps *PubSub) MetricsHandler(rw http.ResponseWriter, r *http.Request)
- func (ps *PubSub) Processor() sdktrace.SpanProcessor
- func (ps *PubSub) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (ps *PubSub) Shutdown(ctx context.Context) error
- func (ps *PubSub) SpanSubscribers(topic Topic) []sdktrace.SpanExporter
- func (ps *PubSub) Spans() sdktrace.SpanExporter
- func (ps *PubSub) SubscribeToLogs(ctx context.Context, topic Topic, exp sdklog.Exporter) error
- func (ps *PubSub) SubscribeToSpans(ctx context.Context, topic Topic, exp sdktrace.SpanExporter) error
- func (ps *PubSub) TracesHandler(rw http.ResponseWriter, r *http.Request)
- type SpanHeartbeater
- type SpansPubSub
- type SubscribeRequest
- func (*SubscribeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeRequest) GetClientId() string
- func (x *SubscribeRequest) GetTraceId() []byte
- func (*SubscribeRequest) ProtoMessage()
- func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
- func (x *SubscribeRequest) Reset()
- func (x *SubscribeRequest) String() string
- type Topic
- type TraceServer
- type TracesSourceClient
- type TracesSourceServer
- type TracesSource_SubscribeClient
- type TracesSource_SubscribeServer
- type UnimplementedLogsSourceServer
- type UnimplementedMetricsSourceServer
- type UnimplementedTracesSourceServer
- type UnsafeLogsSourceServer
- type UnsafeMetricsSourceServer
- type UnsafeTracesSourceServer
Constants ¶
const HeartbeatInterval = 30 * time.Second
const (
LogsSource_Subscribe_FullMethodName = "/telemetry.LogsSource/Subscribe"
)
const (
MetricsSource_Subscribe_FullMethodName = "/telemetry.MetricsSource/Subscribe"
)
const (
TracesSource_Subscribe_FullMethodName = "/telemetry.TracesSource/Subscribe"
)
Variables ¶
var File_servers_proto protoreflect.FileDescriptor
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)
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)
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 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)
Types ¶
type Labels ¶
func LoadDefaultLabels ¶
func (*Labels) UnmarshalJSON ¶
func (Labels) WithAnonymousGitLabels ¶
func (Labels) WithCILabels ¶
func (Labels) WithCircleCILabels ¶
func (Labels) WithClientLabels ¶
func (Labels) WithEngineLabel ¶
func (Labels) WithGitHubLabels ¶
func (Labels) WithGitLabLabels ¶
func (Labels) WithGitLabels ¶
func (Labels) WithServerLabels ¶
func (Labels) WithVCSLabels ¶
type LogsPubSub ¶
type LogsPubSub struct {
*PubSub
}
type LogsServer ¶
type LogsServer struct { PubSub *PubSub *colllogsv1.UnimplementedLogsServiceServer *UnimplementedLogsSourceServer }
func (*LogsServer) Export ¶
func (e *LogsServer) Export(ctx context.Context, req *colllogsv1.ExportLogsServiceRequest) (*colllogsv1.ExportLogsServiceResponse, error)
func (*LogsServer) Subscribe ¶
func (e *LogsServer) Subscribe(req *SubscribeRequest, stream LogsSource_SubscribeServer) 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 (ps MetricsPubSub) Aggregation(kind sdkmetric.InstrumentKind) sdkmetric.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 ¶
func (ps MetricsPubSub) Temporality(kind sdkmetric.InstrumentKind) metricdata.Temporality
type MetricsServer ¶
type MetricsServer struct { PubSub *PubSub *collmetricsv1.UnimplementedMetricsServiceServer *UnimplementedMetricsSourceServer }
func (*MetricsServer) Export ¶
func (e *MetricsServer) Export(ctx context.Context, req *collmetricsv1.ExportMetricsServiceRequest) (*collmetricsv1.ExportMetricsServiceResponse, error)
func (*MetricsServer) Subscribe ¶
func (e *MetricsServer) Subscribe(req *SubscribeRequest, srv MetricsSource_SubscribeServer) error
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.
func NewMetricsSourceClient ¶
func NewMetricsSourceClient(cc grpc.ClientConnInterface) MetricsSourceClient
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 (*PubSub) ClientDisconnected ¶ added in v0.11.8
ClientDisconnected is called when a client disconnects from the server.
This hook is necessary for draining any dependent clients who were waiting for the client's spans or logs to complete.
func (*PubSub) ForceFlush ¶
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) LogsHandler ¶
func (ps *PubSub) LogsHandler(rw http.ResponseWriter, r *http.Request)
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) SpanSubscribers ¶
func (ps *PubSub) SpanSubscribers(topic Topic) []sdktrace.SpanExporter
func (*PubSub) Spans ¶
func (ps *PubSub) Spans() sdktrace.SpanExporter
func (*PubSub) SubscribeToLogs ¶
func (*PubSub) SubscribeToSpans ¶
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
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 TraceServer ¶
type TraceServer struct { PubSub *PubSub *colltracev1.UnimplementedTraceServiceServer *UnimplementedTracesSourceServer }
func (*TraceServer) Export ¶
func (e *TraceServer) Export(ctx context.Context, req *colltracev1.ExportTraceServiceRequest) (*colltracev1.ExportTraceServiceResponse, error)
func (*TraceServer) Subscribe ¶
func (e *TraceServer) Subscribe(req *SubscribeRequest, srv TracesSource_SubscribeServer) error
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.
func NewTracesSourceClient ¶
func NewTracesSourceClient(cc grpc.ClientConnInterface) TracesSourceClient
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 ¶
func (UnimplementedLogsSourceServer) Subscribe(*SubscribeRequest, LogsSource_SubscribeServer) error
type UnimplementedMetricsSourceServer ¶
type UnimplementedMetricsSourceServer struct { }
UnimplementedMetricsSourceServer must be embedded to have forward compatible implementations.
func (UnimplementedMetricsSourceServer) Subscribe ¶
func (UnimplementedMetricsSourceServer) Subscribe(*SubscribeRequest, MetricsSource_SubscribeServer) error
type UnimplementedTracesSourceServer ¶
type UnimplementedTracesSourceServer struct { }
UnimplementedTracesSourceServer must be embedded to have forward compatible implementations.
func (UnimplementedTracesSourceServer) Subscribe ¶
func (UnimplementedTracesSourceServer) Subscribe(*SubscribeRequest, TracesSource_SubscribeServer) error
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.