scrape Self
fun scrapeSelf(path: String, port: Int, username: String? = null, password: String? = null, metricsPath: String = "metrics", labels: Map<String, String> = emptyMap()): EmbeddedAgentConfig.Builder(source)
Has the agent scrape the app it's embedded in: its metrics at http://127.0.0.1:<port>/<metricsPath>, served to Prometheus at the proxy's path. A username and password are sent as Basic Auth; they're percent-encoded into the URL, which the agent leaves out of its logs. Both empty means none.