enableAutoSqlIdGeneration
abstract fun enableAutoSqlIdGeneration(enableAutoSqlIdGeneration: Boolean): SpringJdbcKueryClientBuilder(source)
Sets whether to automatically generate a sqlId for metrics when sql { ... } is called without an explicit sqlId. When observationRegistry is specified, the default is true; otherwise, the default is false.
The sqlId is generated at compile time by the compiler plugin from the fully qualified name of the call site's enclosing declaration (e.g. com.example.UserRepository.selectByUserId), so no runtime stack inspection is involved and a given call site always produces the same sqlId. Blocks passed via a variable and call sites not compiled with the compiler plugin resolve to the fixed sqlId NONE; specify the sqlId explicitly in such cases.