Documentation
¶
Overview ¶
Package otlp admits public OTLP/HTTP into a deployment-owned Collector. It does not depend on operator sessions, IAM, the registry or PostgreSQL.
Index ¶
Constants ¶
const ( IngestHeader = "X-Backplane-Ingest" IngestProxy = "proxy" )
IngestHeader carries IngestProxy on every request the proxy forwards: the Collector (include_metadata) turns it into the backplane.ingest attribute its audit pipeline drops.
Variables ¶
var ErrConfig = errors.New("invalid OTLP admission configuration")
ErrConfig indicates an unsafe or incomplete admission configuration.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
URL string `json:"url,omitempty"`
Keys []config.Secret `json:"keys,omitempty"`
TrustedProxies []string `json:"trusted_proxies,omitempty"`
BodyBytes int64 `json:"body_bytes" schemapb:"default=2097152;gte=1024;lte=16777216"`
Concurrent int64 `json:"concurrent" schemapb:"default=16;gte=1;lte=1024"`
RatePerMinute int64 `json:"rate_per_minute" schemapb:"default=300;gte=1;lte=1000000"`
Burst int64 `json:"burst" schemapb:"default=120;gte=1;lte=1000000"`
MaxIPs int64 `json:"max_ips" schemapb:"default=4096;gte=1;lte=1000000"`
IdleTTL time.Duration `json:"idle_ttl" schemapb:"default=10m;gt=0"`
Timeout time.Duration `json:"timeout" schemapb:"default=10s;gt=0"`
}
Config is deployment-only; an empty URL disables the ingress route.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is shared by all three signals on one replica. The concurrency bound covers body reads, decompression and upstream response reads, with no queue.
func (*Handler) Close ¶
func (h *Handler) Close()
Close releases idle upstream connections during shutdown.
func (*Handler) ServeHTTP ¶
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP expects /v1/logs, /v1/metrics or /v1/traces after prefix stripping.
func (*Handler) SessionLogs ¶
SessionLogs is for the console's authenticated, same-origin route only. It shares public admission limits and marks records as proxy traffic, so they cannot become application audit. The caller must validate the session.