Documentation
¶
Overview ¶
Package obs provides bounded, read-only queries of independent Victoria stores.
Index ¶
- Variables
- type Config
- type Errors
- type Option
- type Service
- func (s *Service) Close()
- func (s *Service) Errors() *Errors
- func (s *Service) GetObsCapabilities(context.Context, *consolev1.GetObsCapabilitiesRequest) (*consolev1.GetObsCapabilitiesResponse, error)
- func (s *Service) GetObsSelectors(_ context.Context, req *consolev1.GetObsSelectorsRequest) (*consolev1.GetObsSelectorsResponse, error)
- func (s *Service) GetTrace(ctx context.Context, req *consolev1.GetTraceRequest) (*consolev1.GetTraceResponse, error)
- func (s *Service) ListObsFieldValues(ctx context.Context, req *consolev1.ListObsFieldValuesRequest) (*consolev1.ListObsFieldValuesResponse, error)
- func (s *Service) ListObsFields(ctx context.Context, req *consolev1.ListObsFieldsRequest) (*consolev1.ListObsFieldsResponse, error)
- func (s *Service) ListObsSources(ctx context.Context, req *consolev1.ListObsSourcesRequest) (*consolev1.ListObsSourcesResponse, error)
- func (s *Service) QueryObs(ctx context.Context, req *consolev1.QueryObsRequest) (*consolev1.QueryObsResponse, error)
- func (s *Service) Register(registrar grpc.ServiceRegistrar)
- type SourceSelection
Constants ¶
This section is empty.
Variables ¶
var ErrURL = errors.New("want HTTP(S) API root without credentials, query or fragment")
ErrURL identifies an invalid deployment query API root.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
SourceOverrides map[string]SourceSelection `json:"source_overrides,omitempty"`
MetricsURL string `json:"metrics_url,omitempty"`
LogsURL string `json:"logs_url,omitempty"`
TracesURL string `json:"traces_url,omitempty"`
MetricsAuthorization config.Secret `json:"metrics_authorization,omitempty"`
LogsAuthorization config.Secret `json:"logs_authorization,omitempty"`
TracesAuthorization config.Secret `json:"traces_authorization,omitempty"`
TraceQL bool `json:"traceql" schemapb:"default=false"`
Concurrent int `json:"concurrent" schemapb:"default=8;gte=1;lte=128"`
DefaultLimit uint32 `json:"default_limit" schemapb:"default=200;gte=1;lte=10000"`
MaxLimit uint32 `json:"max_limit" schemapb:"default=2000;gte=1;lte=10000"`
MaxPoints uint32 `json:"max_points" schemapb:"default=20000;gte=1;lte=1000000"`
ResponseBytes int64 `json:"response_bytes" schemapb:"default=8388608;gte=1024"`
ExpressionBytes int `json:"expression_bytes" schemapb:"default=32768;gte=1;lte=1048576"`
Timeout time.Duration `json:"timeout" schemapb:"default=30s;gt=0;lte=5m"`
MaxRange time.Duration `json:"max_range" schemapb:"default=744h;gt=0"`
}
Config belongs to deployment, never to UI. URLs are read API roots; a path prefix (such as /select/0/prometheus) is allowed. Disabled stores need no URL.
type Errors ¶
type Errors struct {
// contains filtered or unexported fields
}
Errors reads what the log store holds around an error occurrence kept in the durable error store: the logs of its span, trace, SDK runtime or service window.
func (*Errors) Logs ¶ added in v0.4.0
func (e *Errors) Logs( ctx context.Context, req *consolev1.RelatedLogsRequest, o *consolev1.ErrorOccurrence, when time.Time, ) (*consolev1.RelatedLogsResponse, error)
Logs reads logs related to o: by the request's relation and range, else a window around when.
type Option ¶
type Option func(*Service)
Option supplies read-only metadata; no telemetry ingestion dependency.
func WithRegistry ¶
WithRegistry resolves optional module declarations from current manifests.
type Service ¶
type Service struct {
consolev1.UnimplementedObsServiceServer
// contains filtered or unexported fields
}
Service owns a bounded HTTP connection pool, not telemetry storage/lifecycle.
func (*Service) GetObsCapabilities ¶
func (s *Service) GetObsCapabilities( context.Context, *consolev1.GetObsCapabilitiesRequest, ) (*consolev1.GetObsCapabilitiesResponse, error)
GetObsCapabilities describes enabled integrations, never their credentials.
func (*Service) GetObsSelectors ¶
func (s *Service) GetObsSelectors( _ context.Context, req *consolev1.GetObsSelectorsRequest, ) (*consolev1.GetObsSelectorsResponse, error)
GetObsSelectors resolves deployment -> declaration -> OTel convention.
func (*Service) GetTrace ¶
func (s *Service) GetTrace(ctx context.Context, req *consolev1.GetTraceRequest) (*consolev1.GetTraceResponse, error)
GetTrace preserves the complete storage response, including backend extensions.
func (*Service) ListObsFieldValues ¶
func (s *Service) ListObsFieldValues( ctx context.Context, req *consolev1.ListObsFieldValuesRequest, ) (*consolev1.ListObsFieldValuesResponse, error)
ListObsFieldValues returns a bounded suggestion set, not a pagination cursor.
func (*Service) ListObsFields ¶
func (s *Service) ListObsFields( ctx context.Context, req *consolev1.ListObsFieldsRequest, ) (*consolev1.ListObsFieldsResponse, error)
ListObsFields lists native backend field names (not a closed OTel schema).
func (*Service) ListObsSources ¶
func (s *Service) ListObsSources( ctx context.Context, req *consolev1.ListObsSourcesRequest, ) (*consolev1.ListObsSourcesResponse, error)
ListObsSources never consults module registration or declarations.
func (*Service) QueryObs ¶
func (s *Service) QueryObs(ctx context.Context, req *consolev1.QueryObsRequest) (*consolev1.QueryObsResponse, error)
QueryObs does not translate expressions between languages.
func (*Service) Register ¶
func (s *Service) Register(registrar grpc.ServiceRegistrar)
Register is shared by the authenticated console and SDK internal listener.
type SourceSelection ¶
SourceSelection is a deployment-only override. Presence of an empty entry explicitly disables module presets, without hiding any stored sources.