obs

package
v0.6.101 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package obs provides bounded, read-only queries of independent Victoria stores.

Index

Constants

This section is empty.

Variables

View Source
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.

func (Config) Validate

func (c Config) Validate() error

Validate reports no credential-bearing URL or header contents.

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) Available added in v0.4.0

func (e *Errors) Available() bool

Available reports whether a log store is configured.

func (*Errors) Logs added in v0.4.0

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

func WithRegistry(source registry.Source) Option

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 New

func New(cfg Config, options ...Option) (*Service, error)

New does not contact storage; its outage never gates platform startup.

func (*Service) Close

func (s *Service) Close()

Close releases idle HTTP connections.

func (*Service) Errors

func (s *Service) Errors() *Errors

Errors is the related-logs reader over s's stores.

func (*Service) GetObsCapabilities

GetObsCapabilities describes enabled integrations, never their credentials.

func (*Service) GetObsSelectors

GetObsSelectors resolves deployment -> declaration -> OTel convention.

func (*Service) GetTrace

GetTrace preserves the complete storage response, including backend extensions.

func (*Service) ListObsFieldValues

ListObsFieldValues returns a bounded suggestion set, not a pagination cursor.

func (*Service) ListObsFields

ListObsFields lists native backend field names (not a closed OTel schema).

func (*Service) ListObsSources

ListObsSources never consults module registration or declarations.

func (*Service) QueryObs

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

type SourceSelection struct {
	Selectors []map[string]string `json:"selectors,omitempty"`
}

SourceSelection is a deployment-only override. Presence of an empty entry explicitly disables module presets, without hiding any stored sources.

Directories

Path Synopsis
Package logsql builds VictoriaLogs LogsQL queries.
Package logsql builds VictoriaLogs LogsQL queries.

Jump to

Keyboard shortcuts

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