MCPcopy
hub / github.com/thanos-io/thanos

github.com/thanos-io/thanos @v0.41.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.41.0 ↗
12,881 symbols 50,302 edges 700 files 2,310 documented · 18%
README

Thanos Logo

Latest Release Go Report Card Go Code reference Slack Netlify Status CII Best Practices

CI CI go react docs Gitpod ready-to-code Open in GitHub Codespaces

📢 ThanosCon happened on 19th March 2024 as a co-located half-day on KubeCon EU in Paris.

Overview

Thanos is a set of components that can be composed into a highly available metric system with unlimited storage capacity, which can be added seamlessly on top of existing Prometheus deployments.

Thanos is a CNCF Incubating project.

Thanos leverages the Prometheus 2.0 storage format to cost-efficiently store historical metric data in any object storage while retaining fast query latencies. Additionally, it provides a global query view across all Prometheus installations and can merge data from Prometheus HA pairs on the fly.

Concretely the aims of the project are:

  1. Global query view of metrics.
  2. Unlimited retention of metrics.
  3. High availability of components, including Prometheus.

Getting Started

Features

  • Global querying view across all connected Prometheus servers
  • Deduplication and merging of metrics collected from Prometheus HA pairs
  • Seamless integration with existing Prometheus setups
  • Any object storage as its only, optional dependency
  • Downsampling historical data for massive query speedup
  • Cross-cluster federation
  • Fault-tolerant query routing
  • Simple gRPC "Store API" for unified data access across all metric data
  • Easy integration points for custom metric providers

Architecture Overview

Deployment with Sidecar for Kubernetes:

Sidecar

Deployment with Receive in order to scale out or implement with other remote write compatible sources:

Receive

Thanos Philosophy

The philosophy of Thanos and our community is borrowing much from UNIX philosophy and the golang programming language.

  • Each subcommand should do one thing and do it well
  • e.g. thanos query proxies incoming calls to known store API endpoints merging the result
  • Write components that work together
  • e.g. blocks should be stored in native prometheus format
  • Make it easy to read, write, and, run components
  • e.g. reduce complexity in system design and implementation

Releases

Main branch should be stable and usable. Every commit to main builds docker image named main-<date>-<sha> in quay.io/thanos/thanos and thanosio/thanos dockerhub (mirror)

We also perform minor releases every 6 weeks.

During that, we build tarballs for major platforms and release docker images.

See release process docs for details.

Contributing

Contributions are very welcome! See our CONTRIBUTING.md for more information.

Community

Thanos is an open source project and we value and welcome new contributors and members of the community. Here are ways to get in touch with the community:

Adopters

See Adopters List.

Maintainers

See MAINTAINERS.md

Extension points exported contracts — how you extend this code

Appendable (Interface)
Appendable returns an Appender. [9 implementers]
pkg/receive/writer.go
Component (Interface)
Component is a generic component interface. [166 implementers]
pkg/component/component.go
IndexCache (Interface)
IndexCache is the interface exported by index cache backends. Store operations do not support context.Context, deadlines [6 …
pkg/store/cache/cache.go
HTTPClient (Interface)
HTTPClient sends an HTTP request and returns the response. [14 implementers]
pkg/promclient/promclient.go
MetadataFilter (Interface)
Filter allows filtering or modifying metas from the provided map or returns error. [11 implementers]
pkg/block/fetcher.go
Handler (Interface)
Handler is like http.Handle, but specifically for Prometheus query_range calls. [14 implementers]
internal/cortex/querier/queryrange/roundtrip.go
TSDBStatisticsGetter (Interface)
TSDBStatisticsGetter is an interface to retrieve TSDB statistics. [5 implementers]
pkg/status/status.go
Gate (Interface)
Gate controls the maximum number of concurrently running and waiting queries. Example of use: g := gate.New(r, 5) i [5 …
pkg/gate/gate.go

Core symbols most depended-on inside this repo

Errorf
called by 1351
pkg/tracing/stackdriver/tracer.go
String
called by 954
pkg/store/proxy.go
push
called by 666
pkg/ui/static/react/static/js/main.ed1f5447.js
Add
called by 643
pkg/receive/handler.go
Wrap
called by 611
internal/cortex/querier/queryrange/roundtrip.go
New
called by 609
pkg/gate/gate.go
n
called by 582
pkg/ui/static/react/static/js/main.ed1f5447.js
c
called by 524
pkg/ui/static/react/static/js/main.ed1f5447.js

Shape

Method 6,956
Function 3,968
Struct 1,089
Class 397
Interface 276
TypeAlias 136
FuncType 58
Enum 1

Languages

Go73%
TypeScript27%

Modules by API surface

pkg/ui/static/react/static/js/main.ed1f5447.js3,209 symbols
internal/cortex/querier/queryrange/queryrange.pb.go463 symbols
pkg/receive/writecapnp/write_request.capnp.go302 symbols
pkg/store/storepb/rpc.pb.go273 symbols
pkg/store/storepb/prompb/types.pb.go242 symbols
pkg/api/query/querypb/query.pb.go232 symbols
pkg/rules/rulespb/rpc.pb.go186 symbols
pkg/info/infopb/rpc.pb.go166 symbols
pkg/store/bucket.go153 symbols
internal/cortex/cortexpb/cortex.pb.go146 symbols
pkg/status/statuspb/rpc.pb.go132 symbols
pkg/store/hintspb/hints.pb.go125 symbols

Dependencies from manifests, versioned

capnproto.org/go/capnp/v3v3.1.0-alpha.1 · 1×
cel.dev/exprv0.24.0 · 1×
cloud.google.com/gov0.120.0 · 1×
cloud.google.com/go/authv0.17.0 · 1×
cloud.google.com/go/auth/oauth2adaptv0.2.8 · 1×
cloud.google.com/go/compute/metadatav0.9.0 · 1×
cloud.google.com/go/monitoringv1.24.2 · 1×
cloud.google.com/go/storagev1.50.0 · 1×
cloud.google.com/go/tracev1.11.6 · 1×
github.com/Azure/azure-sdk-for-go/sdk/azcorev1.19.1 · 1×
github.com/Azure/azure-sdk-for-go/sdk/azidentityv1.12.0 · 1×

For agents

$ claude mcp add thanos \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact