MCPcopy Index your code
hub / github.com/cortexproject/cortex

github.com/cortexproject/cortex @v1.21.1

repository ↗ · DeepWiki ↗ · release v1.21.1 ↗ · Ask this repo → · + Follow
11,326 symbols 55,776 edges 925 files 2,692 documented · 24% updated 2d agov1.21.1 · 2026-06-05★ 5,820241 open issues
README

Cortex Logo

OpenSSF Scorecard CI GoDoc Go Report Card Slack CLOMonitor

Cortex

Cortex is a horizontally scalable, highly available, multi-tenant, long-term storage solution for Prometheus and OpenTelemetry Metrics.

Features

  • Horizontally scalable: Cortex can run across multiple machines in a cluster, exceeding the throughput and storage of a single machine.
  • Highly available: When run in a cluster, Cortex can replicate data between machines.
  • Multi-tenant: Cortex can isolate data and queries from multiple different independent Prometheus sources in a single cluster.
  • Long-term storage: Cortex supports S3, GCS, Swift and Microsoft Azure for long-term storage of metric data.

Documentation

Community and Support

If you have any questions about Cortex, you can:

Your feedback is always welcome.

For security issues see https://github.com/cortexproject/cortex/security/policy

Engage with Our Community

We invite you to participate in the Cortex Community Calls, an exciting opportunity to connect with fellow developers and enthusiasts. These meetings are held every 4 weeks on Thursdays at 1700 UTC, providing a platform for open discussion, collaboration, and knowledge sharing.

Our meeting notes are meticulously documented and can be accessed here, offering a comprehensive overview of the topics discussed and decisions made.

To ensure you never miss a meeting, we've made it easy for you to keep track:

  • View the Cortex Community Call schedule in your browser here.
  • Alternatively, download the .ics file here for use with any calendar application or service that supports the iCal format.

Join us in shaping the future of Cortex, and let's build something amazing together!

Further reading

Talks

Blog Posts

Extension points exported contracts — how you extend this code

FlushTransferer (Interface)
FlushTransferer controls the shutdown of an instance in the ring. Methods on this interface are called when lifecycler i [6 …
pkg/ring/flush.go
ClientsPool (Interface)
ClientsPool is the interface used to get the client from the pool for a specified address. [7 implementers]
pkg/alertmanager/alertmanager_client.go
QueryableWithFilter (Interface)
QueryableWithFilter extends Queryable interface with `UseQueryable` filtering function. [6 implementers]
pkg/querier/querier.go
ClosableClientConn (Interface)
ClosableClientConn is grpc.ClientConnInterface with Close function [61 implementers]
pkg/ingester/client/client.go
Pusher (Interface)
Pusher is an ingester server that accepts pushes. [16 implementers]
pkg/ruler/compat.go
Cache (Interface)
Cache byte arrays by key. NB we intentionally do not return errors in this interface - caching is best effort by defini [6 …
pkg/chunk/cache/cache.go
CollectorVec (Interface)
CollectorVec is a collector that can delete metrics by labels. Implemented by *prometheus.MetricVec (used by CounterVec, [27 …
pkg/util/metrics_helper.go
DB (Interface)
DB is the interface for the database. [4 implementers]
pkg/configs/db/db.go

Core symbols most depended-on inside this repo

Add
called by 1453
pkg/util/math/rate.go
Join
called by 834
pkg/ring/lifecycler.go
String
called by 818
pkg/compactor/visit_marker.go
Run
called by 794
pkg/ruler/compat.go
Error
called by 742
pkg/api/queryapi/util.go
MockGet
called by 401
pkg/storage/bucket/client_mock.go
Set
called by 361
pkg/util/parquetutil/shard_cache.go
Inc
called by 341
pkg/util/math/rate.go

Shape

Method 6,055
Function 3,768
Struct 1,199
Interface 164
TypeAlias 100
FuncType 40

Languages

Go100%

Modules by API surface

pkg/ingester/client/ingester.pb.go642 symbols
pkg/cortexpb/cortex.pb.go390 symbols
pkg/querier/tripperware/query.pb.go353 symbols
pkg/scheduler/schedulerpb/scheduler.pb.go185 symbols
pkg/ruler/ruler.pb.go174 symbols
pkg/distributed_execution/querierpb/querier.pb.go174 symbols
pkg/util/validation/limits.go134 symbols
pkg/ingester/ingester.go123 symbols
pkg/ingester/ingester_test.go113 symbols
pkg/frontend/v1/frontendv1pb/frontend.pb.go112 symbols
pkg/distributor/distributor_test.go90 symbols
pkg/alertmanager/alertmanagerpb/alertmanager.pb.go89 symbols

Dependencies from manifests, versioned

cel.dev/exprv0.24.0 · 1×
cloud.google.com/gov0.120.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×
github.com/Azure/azure-sdk-for-go/sdk/azcorev1.19.1 · 1×
github.com/Azure/azure-sdk-for-go/sdk/azidentityv1.12.0 · 1×
github.com/Azure/azure-sdk-for-go/sdk/internalv1.11.2 · 1×
github.com/Azure/azure-sdk-for-go/sdk/storage/azblobv1.6.1 · 1×

Datastores touched

configsDatabase · 1 repos
configs_testDatabase · 1 repos

For agents

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

⬇ download graph artifact