← Về thư mục
openai4s/telemetry/collector.py
- Aggregate · class · L48-L80 — class Aggregate
- init · method · L56-L60 — def init(self) -> None
- record · method · L62-L68 — def record(self, install_id: str, records: list[dict[str, Any]]) -> None
- note_rejected · method · L70-L72 — def note_rejected(self) -> None
- snapshot · method · L74-L80 — def snapshot(self) -> dict[str, Any]
- validate_envelope · function · L83-L113 — def validate_envelope(raw: bytes) -> dict[str, Any] | None
- _RateLimiter · class · L116-L133 — class _RateLimiter
- init · method · L119-L123 — def init(self, rate: float, burst: int) -> None
- allow · method · L125-L133 — def allow(self, key: str, now: float) -> bool
- make_collector_handler · function · L136-L212 — def make_collector_handler( aggregate: Aggregate, *, allowed_hosts: frozenset[str], rate_per_sec: float = 20.0, rate_burst: int = 60, trust_proxy: bool = False, )
- Handler · class · L146-L210 — class Handler(BaseHTTPRequestHandler)
- log_message · method · L150-L151 — def log_message(self, *a): # quiet
- _client_ip · method · L153-L158 — def _client_ip(self) -> str
- _host_ok · method · L160-L165 — def _host_ok(self) -> bool: # A Host allowlist, not an Origin==Host check: the relay's history # has a DNS-rebinding finding that came from trusting Host without # one, and a collector copying that shape would inherit it.
- _simple · method · L167-L176 — def _simple(self, code: int, body: bytes) -> None
- do_GET · method · L178-L179 — def do_GET(self)
- do_POST · method · L181-L210 — def do_POST(self)
- CollectorServer · class · L215-L234 — class CollectorServer(ThreadingHTTPServer)
- init · method · L219-L234 — def init( self, address: tuple[str, int], *, allowed_hosts: frozenset[str], trust_proxy: bool = False, ) -> None