Builder
Builds an EmbeddedAgentConfig. Each method returns the builder, so calls chain in Java and read as statements in Kotlin's embeddedAgent block; a method called twice keeps its last value, and path and scrapeSelf add a path each time. Anything the builder has no method for, setting sets by its key. A value the builder can tell is wrong, such as a port out of range, throws ConfigLoadException, as start does for one the agent rejects.
In Kotlin, a setting that takes one value is a property too, so name = "my-app" does what name("my-app") does; Java sees only the methods.
Properties
The port of the agent's own metrics endpoint, which is off unless one is given (agent.metrics.enabled and agent.metrics.port); null turns it off again.
Whether the agent registers its paths in consolidated mode, alongside other agents (agent.consolidated).
Functions
Turns on the agent's own metrics endpoint, on port; sets agentMetricsPort.
The settings, ready to start.
The agent's own certificate chain and private key, as PEM text or its base64, for a proxy that requires mutual TLS (agent.tls.certChainPem and agent.tls.privateKeyPem).
Sets consolidated; with no argument, turns it on.
Sets name.
Sets proxy to one endpoint or several, in the order the agent fails over through them.
Sets any other agent setting by its key, relative to agent, such as scrapeTimeoutSecs or http.clientTimeoutSecs (see the agent's configuration reference). It takes precedence over a builder method that sets the same key. Keys aren't checked, so a misspelled one has no effect: prefer a builder method where there is one.
Sets token.
The certificate the agent trusts the proxy's certificate by, as PEM text or its base64 (agent.tls.trustCertCollectionPem), which turns TLS on. authority is the name the proxy's certificate was issued to, when it isn't the host the agent connects to (agent.tls.overrideAuthority).