je_load_density.utils.metrics.influxdb_sink

Functions

start_influxdb_sink([transport, host, port, ...])

啟動 InfluxDB sink,將每個 request 寫入 line protocol。 Start an InfluxDB sink that writes each request as a line-protocol point.

stop_influxdb_sink()

je_load_density.utils.metrics.influxdb_sink.start_influxdb_sink(transport: str = 'udp', host: str = '127.0.0.1', port: int = 8089, url: str | None = None, token: str | None = None, measurement: str = 'loaddensity_request', timeout: float = 2.0) None

啟動 InfluxDB sink,將每個 request 寫入 line protocol。 Start an InfluxDB sink that writes each request as a line-protocol point. transport=udp uses host:port; transport=http requires url.

URL is caller-supplied so this defers to the operator’s configured InfluxDB endpoint; not a hard-coded destination.

je_load_density.utils.metrics.influxdb_sink.stop_influxdb_sink() None