start Sync Agent
Starts an Agent and returns once it is running.
Logs the agent banner and version, parses args into an AgentOptions, constructs an Agent, and calls startSync() from the constructor's initBlock, which waits up to 30 seconds for the Agent to start and throws if it doesn't. The Agent then runs on its own service thread, which isn't a daemon thread, so a JVM whose main() calls this keeps running until the Agent stops (e.g. a process signal, a fatal error, or stop).
Use this from main(), as the standalone Agent does. For embedded usage inside another running JVM, use startAsyncAgent, which returns an EmbeddedAgentInfo handle for stopping it.
Parameters
Raw command-line arguments forwarded to AgentOptions for parsing.
When true, the Agent behaves as the standalone CLI does: it requires a config file or URL, and exits the process when the config can't be loaded, an option is invalid, or -v/-u is given. When false, as when embedding, it falls back to the built-in reference config when none is given, and throws io.prometheus.common.ConfigLoadException in those cases instead.