MCPcopy Index your code
hub / github.com/prometheus/common

github.com/prometheus/common @v0.69.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.69.0 ↗ · + Follow
781 symbols 2,419 edges 63 files 347 documented · 44% 610 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Common

circleci OpenSSF Scorecard

This repository contains Go libraries that are shared across Prometheus components and libraries. They are considered internal to Prometheus, without any stability guarantees for external usage.

  • assets: Embedding of static assets with gzip support
  • config: Common configuration structures
  • expfmt: Decoding and encoding for the exposition format
  • model: Shared data structures
  • promslog: A logging wrapper around log/slog
  • route: A routing wrapper around httprouter using context.Context
  • server: Common servers
  • version: Version information and metrics

Extension points exported contracts — how you extend this code

DirectorySetter (Interface)
DirectorySetter is a config type that contains file paths that may be relative to the file containing the config. [7 implementers]
config/config.go
SecretManager (Interface)
SecretManager manages secret data mapped to names known as "references" or "refs". [4 implementers]
config/http_config.go
Decoder (Interface)
Decoder types decode an input stream into metric families. [4 implementers]
expfmt/decode.go
Value (Interface)
Value is a generic interface for values resulting from a query evaluation. [2 implementers]
model/value_type.go
Closer (Interface)
Closer is implemented by Encoders that need to be closed to finalize encoding. (For example, OpenMetrics needs a final ` [2 …
expfmt/encode.go
EncoderOption (FuncType)
(no doc)
expfmt/openmetrics_create.go
HTTPClientOption (Interface)
HTTPClientOption defines an option that can be applied to the HTTP client. [1 implementers]
config/http_config.go
Encoder (Interface)
Encoder types encode metric families into an underlying wire protocol. [1 implementers]
expfmt/encode.go

Core symbols most depended-on inside this repo

String
called by 440
model/value_type.go
Get
called by 91
route/route.go
Error
called by 73
expfmt/text_parse.go
WriteByte
called by 55
expfmt/text_create.go
Add
called by 51
model/time.go
WriteString
called by 46
expfmt/text_create.go
Equal
called by 42
model/time.go
Close
called by 36
expfmt/encode.go

Shape

Function 368
Method 295
Struct 65
TypeAlias 35
Interface 13
FuncType 5

Languages

Go100%

Modules by API surface

config/http_config.go134 symbols
config/http_config_test.go72 symbols
expfmt/text_parse.go38 symbols
model/value.go33 symbols
model/time.go29 symbols
model/metric.go28 symbols
model/signature_test.go26 symbols
model/labels.go21 symbols
expfmt/decode.go20 symbols
model/value_histogram.go19 symbols
model/alert.go18 symbols
route/route.go17 symbols

For agents

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

⬇ download graph artifact