Releases: userver-framework/userver
2.13
Changes since 2.12
Full Changelog: v2.12...v2.13
2.12
Changes since v2.11
-
Added infrastructure to detect IO-bound operations in transactions. See
enable_trx_trackerstatic config option into components::ManagerControllerComponent and userver/utils/trx_tracker.hpp. The detection is turned on by default and is used in HTTP clients and gRPC for PostgreSQL transactions. -
Added support for separate logs and traces endpoints into OpenTelemetry. See
logs-endpointandtracing-endpointstatic config options of the otlp::LoggerComponent. -
Implemented non blocking receive for engine::io::TlsWrapper. Many thanks to Denis Razinkin for the PR!
-
Added server::websocket::WebSocketConnection now has
SendPing()andNotAnsweredSequentialPingsCount()functions for initiating pings on server side. -
Created userver mirror repo at SourceCraft.
-
Kafka now supports SSL authentication. Many thanks to Timur Yalymov for the PR!
-
Fixed UB in WebSockets. Many thanks to Denis Razinkin for the PR!
-
Chaotic now handles
x-usrv-cpp-container: std::unordered_setwithformat: uuid;x-usrv-cpp-type: userver::utils::StrongTypedef<my::CustomString, std::string>;std::intXX_t -
Crypto part of the
userver::universalnow supports work with multiplestd::string_views. Thanks to Dmitry Sorokin for vibe-coding the initial version of PR. -
Google Benchmark ASLR-disabling feature enabled if supported. Many thanks to Konstantin Goncharik for the PR!
-
Simplified third-party types usage in chaotic.
userver_target_generate_chaoticCMake function now has aLINK_TARGETSparameter to provide targets with paths to chaotic serializers. For example withLINK_TARGETS userver::postgresqlchaotic would find theuserver/postgresql/include/userver/chaotic/io/userver/storages/postgres/time_point_tz.hppheader with storages::postgres::TimePointTz converters. -
gRPC and Protobuf
- Implemented retries. See gRPC Timeouts and Retries for more info.
- ugrpc::client::ClientFactoryComponent now can be customized via
ssl-credentials-options. Many thanks to aklyuchev86 for the PR! - decimal64::Decimal::FromStringPermissive() now understands format with exponent, which makes it compatible with Protobuf well-known Decimal types.
-
Database drivers
- Implemented storages::redis::Client::GenericCommand() for execution of custom commands.
- Redis now supports
sentinel_passwordstorages::secdist::Secdist option for authorization on sentinels with password along withpasswordauthorization on shards. Many thanks to Tikhon Sergienko for the PR! - Implemented storages::mongo::Collection::Distinct() command.
- Implemented storages::clickhouse::ParameterStore. Many thanks to Alexey Medvedev for the PR!
update-periodfor components::Secdist is now set to10s. As a result all the databases now automatically recreate connections on connection data change in SecDist.- Implemented parsing of C++
enuminto PostgreSQL text forenumswithParse()andToString()functions. See uPg: PostgreSQL user type mappings for more info.
-
Optimizations
- concurrent::BackgroundTaskStorage was optimized with striped counters. Detaching a task now takes ~6% of the whole CPU usage of the detaching benchmark (before the optimizations it was ~46%).
- storages::Query now avoids dynamic initialization when constructed from storages::Query::NameLiteral. As a result variables generated with CMake
userver_add_sql_libraryfunction are now not affected by initialization order fiasco issues and can be safely used in any static or global variable. Dynamic memory allocations are now avoided for the above cases. - utils::zstring_view now used for Kafka topic names avoiding temporary string constructions.
-
Build
- The oldest supported Python is now Python 3.9.
- Protobuf 6.x.y is now supported. Thanks to halfdarkangel for the PR!
- Supported by-component installation in CPack. See
USERVER_INSTALL_MULTIPACKAGECMake option for a way to enable the feature. - Optimized compilation time for the userver/utils/periodic_task.hpp header by removing inclusion of 7 heavy headers.
- Improved build times by disabling modules scan. Many thanks to Konstantin Goncharik for the PR!
- Builds are now tested on Fedora.
- Bumped Kafka version to 4.0 in CI checks. Many thanks to MichaelKab for PR!
-
Documentation and Diagnostics:
- Version change widget was rewritten to avoid versions hard-code. Many thanks to Lone-Marshal for the PR!
- Added docs on Distro package maintainers roles.
- Added more information on metadata usage into gRPC
USERVER_GTEST_ENABLE_STACK_USAGE_MONITORenvironment variable name was changed toUSERVER_ENABLE_STACK_USAGE_MONITOR.USERVER_ENABLE_STACK_USAGE_MONITORis now usable not only in unit-tests, but in all the userver based applications and services.- Redis driver now does much more logging on cluster topology change to ease the cluster issues debugging.
- Dynamic config pages with description are now generated from schemes.
Full Changelog: v2.11...v2.12
2.11
- Added support for TLS in RedisCluster mode. Many thanks to Danilkormilin for the PR!
- Added ascetic web interface for the uservice-dynconf.
- server::handlers::HttpHandlerStatic now can serve static files from non-root URL paths. Many thanks to Konstantin Goncharik for the PR!
- Added retry budget plugin for HTTP clients clients::http::plugins::retry_budget::Component.
- server::handlers::HttpHandlerStatic now has directory-file static config option that returns file in directory requests. It is set to "index.html" by default, so that http://localhost/ requests return the index.html. Option not-found-file allows customizing 404 pages.
- Added utils::move_only_function.
- Added seek functionality to kafka::ConsumerScope. Many thanks to Mikhail Romaneev for the PR!
- Add a static config option message_key_log_format to kafka::ConsumerComponent to log message key in hex. Many thanks to Mikhail Romaneev for the PR!
- utils::statistics::HistogramView now provides total sum to comply with Prometheus format. Many thanks to DmitriyH for the PR!
- Added UTEST_P_DEATH and UEXPECT_DEBUG_DEATH macro to userver::utest.
- Renamed utils::NullTerminatedView to utils::zstring_view to match C++29 targeted proposal P3655R1.
- Added Get/Set batch size for storages::mongo::Cursor. Many thanks to Konstantin Goncharik for the PR!
- Added engine::GetQueueSize(). Many thanks to Emil Rakhimov for the PR!
- Fixed std::int64_t narrowing to std::int32_t in Kafka. Many thanks to Mikhail Romaneev for the PR!
- Chaotic now validates array type before parsing to chaotic::Array. Many thanks to Konstantin Goncharik for the PR!
- Allow dynamic selection of response streaming. Many thanks to Sergei Fedorov for the PR!
- Added support for mongo::options::Hint for storages::mongo::operations::Delete, storages::mongo::bulk_ops::Update and storages::mongo::bulk_ops::Delete.
- storages::Query now used in ClickHouse, MySQL and SQLite drivers, making it possible to directly use result of generation external SQL/YQL files. storages::Query::Statement() and storages::Query::GetName() are now deprecated and will be removed soon.
gRPC:
- gRPC clients now have ugrpc::client::Reader, ugrpc::client::Writer and ugrpc::client::ReaderWriter names to match ugrpc::server names.
- Fixed data race in bidirectional stream client.
- Optimized clients and server for cases when logging for handler or client is disabled.
- Multiple optimizations for the gRPC logging. Up to 150 times faster logging in edge cases.
Other Optimizations:
- utils::zstring_view is now used throughout the userver to avoid temporary std::string constructions. Affected components include PostgreSQL driver, HTTP clients, Chaotic, universal and Kafka.
- URL utils for schema, query and fragment extraction now have overloads that return std::string_view and avoid dynamic memory allocations.
- Properly make date header for S3 API. This avoids rare cases of CPU-intensive thread blocking. Many thanks to Daniil Shvalov for the PR.
- Size of storages::redis::ReplyData dropped down to 32 bytes from 64 bytes, leading to less memory usage for responses with long arrays.
- Optimized hex logging in Kafka. Many thanks to Mikhail Romaneev for the PR!
Documentation and Diagnostics:
- RealMedium sample was modernized and cleaned up. Now it can be used as a sample. Many thanks to Liiizak for multiple PRs!
- Updated build instructions. Many thanks to h1laryz for the PR!
- Clarified http::ContentType parsing errors.
- More clarifications on engine::Task interruptions for concurrency primitives.
tools/*became samples and were moved into samples/. Tests were added.- "task_processor" and "fs_task_processor" static options now have proper defaults. See Guide on TaskProcessor Usage
- Documented log sinks and formats more thoroughly. See Logging and Tracing.
- Simplified storages::redis::Client *scan commands usage, added samples and more descriptions.
- More docs and samples (and functions) for the userver/http/url.hpp.
- ODBC driver foundation gained an improved error handling and connection pool. Many thanks to Alexey for the PR!
- Added gRPC server middleware implementation, gRPC client middleware implementation and Serving Static Content and Dynamic Web Pages documentation pages.
- Updated Dynamic config with info on how to use kill switches in Functional service tests (testsuite).
Build:
CMAKE_CXX_STANDARDwas set to to 20 by default. C++17 still supported.- Added preliminary CMake configure support on Windows. Many thanks to Alex for the PR.
- Added cmake-format config and formatted the CMake files. Many thanks to Dzmitry Ivaniuk for the PR!
- Added
with_redis_tlsflag for support Redis TLS in Conan. Many thanks to Mikhail Romaneev for the PR! userver_testsuite_add()CMake function now works is used in subdirectory of a project. Many thanks to DmitriyH for the PR!
Full Changelog: v2.10...v2.11
2.10
- Initial implementation of SQLite Driver. Many thanks to Turulin Zakhar for the implementation, tests and for the documentation.
- GDB pretty printers now can list all the tasks via
utask listand can apply commands to all or selected tasks. For exampleutask apply all btprints the backtraces of all the tasks,utask apply some_task_name btprints the backtrace of the task with namesome_task_name. See Debugging with GDB for more info. Many thanks to Maxim Belov for the brilliant implementation. - Merged a foundation for the ODBC driver. Many thanks to Alexey for the PR!
- Redis driver now can ignore ping times to different instances to do a fair round-robin. See
consider_pingfield in storages::redis::CommandControl. - Dropped gRPC
[(userver.field).secret = true];. Use[debug_redact = true];instead. - Statically assert that a destructor of an object in utils::FastPimpl is
noexcept. Many thanks to Шаблов Анатолий Владимирович for the PR!
Optimizations:
- Reduced memory allocations while generating strings for ID in tracing::Span. About a 150ns speedup on average on tracing::Span construction.
- Removed unused code and class members in Redis internals, reducing runtime memory usage and binary code size.
- Replaced
std::unique_lockwithstd::lock_guardwhere possible to simplify optimization work for the compiler.
2.9
- Logging now supports
fmtformatting in macroLOG_INFO("User {} logged in from {}", user_id, ip_address);and lambda formatting. See Logging and Tracing for more info. - PostgreSQL driver now can disable all the statements logging via static config option
statement-log-mode - ClickHouse driver now supports doubles in the queries.
- YDB now can be used with GCC compiler, not only Clang. YDB still requires C++20 support
- components::Redis in sentinel mode now supports selection of database index via database_index in secdist config. Many thanks to Tikhon Sergienko for the PR!
- PostgreSQL cache (shadow replicas) traits now support
kOrderBy. WithDISTINCT ONexpression inkQueryit allows to store only slices of data. Many thanks to Dmitry Kopturov for the PR! - Added a
userver-create-servicescript for creation of a new service. Github service templates are now deprecated. - Notify on state change when it actually happens in Redis Standalone. Many thanks to Nikolay Pervushin for the PR!
- Modernized testsuite code, including removal of event_loop usages and usage of
asyncio-socket. - Hidden
thread_idandtask_idforINFO+ logger levels to made the logs shorter. - Stack usage monitor now could be disabled in test via
USERVER_GTEST_ENABLE_STACK_USAGE_MONITOR=1environment variable. - gRPC
- Added support for debug_redact and added a recommendation to use
[debug_redact = true];instead of[(userver.field).secret = true]; - Significant speed up logging of large requests and response messages. Note that request/response logs are by default enabled with global
DEBUGlogging level; the behavior could be overridden by middlewares static configs of ugrpc::client::middlewares::log::Component and ugrpc::server::middlewares::log::Component. - Server and client logging tags are now consistent.
- More improvements, docs and samples for middlewares. See gRPC for more info.
- Added support for debug_redact and added a recommendation to use
- Build
- Fixed floating point escaping compilation in ClickHouse driver. Many thanks to Ksenia-C for the PR!
- Fix compilation errors for
curl 8.13. Many thanks to Konstantin Goncharik for the PR! - Fix compilation errors for
fmt 11. Many thanks to Konstantin Goncharik for the PR! - Added
USERVER_ENABLE_DEBUG_INFO_COMPRESSIONbuild option, that was later changed toUSERVER_DEBUG_INFO_COMPRESSION. Many thanks to Konstantin Goncharik for the PRs! Compression detection algorithm was improved to check the linker compression support. - Added Debian-12 dependencies and build instructions.
- Export only files that are not ignored by git for Conan sources. Many thanks to c0rt for the PR!
- Documentation and Diagnostics:
- Added Codegen overview, External SQL/YQL files, Coroutine stack documentation.
- Fixed a typo in MacOS build dependencies. Thanks to Alexey for the PR!
- Fixed formatting of CancellableSemaphore::GetCapacity(). Thanks to Sergey Prikhodko for the PR!
- Fixed uncountable amount of issues with Doxygen markup.
- Structures and parsers for userver dynamic configs are now generated by chaotic from schemas.
- More docs for utest::HttpServerMock.
- Reworked Kafka metrics and added docs about them.
- Added docs and samples for
Eval* functions of Redis driver.
2.8
Changes since v2.7:
-
sharding_strategyof the components::Redis now supports RedisStandalone configuration, that may be useful for tests or unimportant caches. Many thanks to Aleksey Ignatiev for the PR! -
kafka::Producer now has the API for sending Kafka headers. Many thanks to Mikhail Romaneev for the PR and to Fedor Lobanov for the fix!
-
kafka::ConsumerScope now has the API for receiving Kafka headers.
-
Add span events to OpenTelemetry via tracing::Span::AddEvent(). Many thanks to Dudnik Pavel for the PR.
-
Added logging::JsonString to explicitly describe in type system that a string contains loggable JSON. Many thanks to akhoroshev for the PR!
-
Deadline Propagation for PostgreSQL is now enabled by default and can be controlled via
deadline-propagation-enabledstatic option of the components::Postgres. -
Testsuite now supports @pytest.mark.uservice_oneshot.
-
utils::regex now always uses a faster and safer Re2 instead of boost::regex.
-
Dynamic config
USERVER_HANDLER_STREAM_API_ENABLEDis not used any more. -
server::handlers::HttpHandlerStatic now has an
expiresstatic config option. -
kafka::ProducerComponent and kafka::ConsumerComponent now supprt 'SASL_PLAINTEXT' security protocol. Many thanks to Mikhail Romaneev for the PR!
-
Implemented OneOf discriminator mapping to integer and generation of
fmt::formatterfor enums in chaotic. -
kRoundRobinload distribution in PostgreSQL is now uniform -
gRPC
- Retries are now supported and controlled via dynamic config. See ugrpc::client::Qos for more info.
- Clients and servers now use the same configuration approach for middlewares, allowing granular overrides of settings.
-
Optimizations
- Postgres driver now uses
moodycamelqueue instead ofboost::lockfree. Up to 2 times faster retrieval of connection from pool. - utils::TrivialBiMap is used in more cases, leading to faster runtime search and minor decrease in binaries size.
- Multiple
std::stringconstants were replaced withconstinittypes, leading to faster startup times and smaller binaries. - Avoid URL copies in clients::http::Request
- Postgres driver now uses
-
Documentation and Diagnostics:
- Fixed typo at Build dependencies. Many thanks to Konstantin Goncharik for the PR.
- More docs on External SQL/YQL files
- Improved parse failure messages for Dynamic config
- Improved diagnostics for corrupted tracing::Span
- Erroneous attempt to log function address is now captured at build time.
-
Build
- Debug symbols of userver libraries are now compressed with
zstdif the toolset supports it, leading to smaller binaries size. - Docker images now use
zstdcompression too. - Dropped CI testing on Ubuntu 20.04 which lifetime almost ended.
- Improved build type matching for installed userver. Many thanks to Aleksey Ignatiev for the PR!
- Debug symbols of userver libraries are now compressed with
2.7
Changes since v2.6:
-
Logging in JSON format was implemented. See static option
formatat components::Logging. -
utils::regex now uses
Re2under the hood, leading to at least x2 faster regular expression matching and guaranteed absence of backtracking. Updating is highly recommended. -
Mongo connection state checking algorithms was adjusted to work well on small RPS.
-
Conan packages now support all the userver features. Conan package build now reuses the CMake install targets and CMake config files.
-
Full feature support for MacOS, including testing and Conan package build and usage on that platform.
-
Added support for TLS certificate chains. See
tls.certstatic option at components::Server. Many thanks to aklyuchev for the PR! -
Chaotic exceptions now do not depend on JSON. Thanks to Artyom for the PR!
-
gRPC
- Out-the-box cache dump support for Protobuf messages. See Implementing serialization (Write / Read) for more info.
- Removed deprecated
*Syncmethods.
-
Optimizations
- Speed up configuration reads on creating new PostgreSQL connections.
- utils::PeriodicTask now calls RCU Read two times less on each iteration.
- Reduced memory allocations count on each Redis request.
-
Build
- New Mongo+gRPC service template. Many thanks to Alexander Kuvaev for the PR!
- Fixed build with
USERVER_FEATURE_JEMALLOC=ON. Many thanks to Aleksey Ignatiev
for the PR! - Service templates service_template, pg_service_template, pg_grpc_service_template, mongo_grpc_service_template now use "cmake presets" and "devcontainers" for out-of-the-box support of VSCode and Clion IDEs.
- Started the work on Ubuntu 24.04 images.
- Added
ubuntu-22.04-userver-pg-devimage with all the tools for development. Planning to switch to Ubuntu-24.04 and leave only 2 containers: with build dependencies to build userver, and with prebuild userver. - Added missing fmt11 headers. Thanks to Pavel Sidorovich for the PR!
- Added
USERVER_USE_STATIC_LIBSto link third-party libraries statically. - Support
pacmanepoch in CMake version detection. Many thanks to Konstantin Goncharik for the PR.
-
Documentation
- Significant update of the Configure, Build and Install
- More docs for tracing::Span::SetLogLevel() and tracing::Span::SetLocalLogLevel()
- Fixed secdist example at components::Mongo. Thank to Nikita Puteev for the PR!
- Highlight the functionality of formats::common::Items in each supported format.
- Add info about full static linkage. Thanks to Nikita for the PR!
- Better
runtestsdocumentation at Functional service tests (testsuite) - Documentation and samples for storages::postgres::io::Codegen{}.
2.6
Changes since v2.5:
-
storages::secdist::Secdist is now automatically reloaded for Mongo, Redis and PostgreSQL databases if the secdist file was changed. Now changing the connection parameters in file does not require service restart.
-
Public parts of the Redis driver were moved out from impl/ directory and placed into storages::redis:: namespace. If you were relying on the old paths, see
./scripts/migrate_from_legacy_redis_ns.shscript to ease migration. -
Shortened testsuite logs were made more functional by providing HTTP URL info.
-
Removed old gRPC interface for server handlers as was promised in previous release notes.
-
gRPC client interfaces were changed to be more user friendly. For example, for
HelloWorldmethod in protobuf we generate the oldHelloWorldfunction along with the newAsyncHelloWorldandSyncHelloWorldfunctions.AsyncHelloWorldreturns a ugrpc::client::ResponseFuture that can be used to retrieve the request result later in code.SyncHelloWorldretrieves the response from the future and returns the response itself. Consider replacing:HelloWorld(x).Finish()withSyncHelloWorld(x)auto res = HelloWorld(x); /* a lot of code */; res.Finish();withauto res = AsyncHelloWorld(x); /* a lot of code*/; res.Get();In next release we will remove the oldHelloWorldand will renameSyncHelloWorldintoHelloWorld.
-
Added Easy - library for single file prototyping. Now the service can be created in a few code lines:
int main(int argc, char* argv[]) {
easy::HttpWith<>(argc, argv)
.DefaultContentType(http::content_type::kTextPlain)
.Route("/hello", [](const server::http::HttpRequest& /*req*/) {
return "Hello world"; // Just return the string as a response body
});
}-
Added
userver_embed_fileCMake function to embed files into the binary. See Writing your first HTTP server for an example. -
Queries now can be moved to a separate files.
-
Added graceful shutdown functionality. See
graceful_shutdown_intervalin components::ManagerControllerComponent. -
server::http::HttpRequestBuilder now can be used to create server::http::HttpRequest in unit tests.
-
Kafka driver now has kafka::ConsumerScope::GetPartitionIds() and kafka::ConsumerScope::GetOffsetRange() functions. Many thanks to Kirill for the PR!
-
OpenTelemetry now sends
span_kindinformation. -
Added user, password, and secure_connection_cert parameters support for the YDB secdist. Thanks to Попов Алексей for the PR!
-
POSTGRES_TOPOLOGY_SETTINGS now has disabled_replicas option to disable some of the replicas.
-
Fixed Kafka logs being written into
STDERRin edge cases. Thanks to Dudnik Pavel for the PR! -
Added unbounded queue variants concurrent::UnboundedNonFifoMpscQueue, concurrent::UnboundedSpmcQueue, and concurrent::UnboundedSpscQueue. Those queues are usually x2 faster than the bounded variants.
-
GTandLTflags support in RedisZADD. Thanks to Nikolay Pervushin for the PR!
Reduced condition in OTLP, thanks to Dudnik Pavel. -
Build:
- Simplified Profile Guided Optimization (PGO) gathering and usage due to new
USERVER_PGO_GENERATEandUSERVER_PGO_USECMake options. See Configure, Build and Install for more info. - MacOS now can build the userver as a Conan package.
- Build flags were reorganized to use a new
USERVER_BUILD_ALL_LIBRARIESCMake option. See Build options for more info. - Source directory now can contain spaces.
- Correctly set grpc-reflection found flag. Thanks to Nikita for the PR!
- Fixed
USERVER_CHAOTIC_FORMAToption for CMake build. Thanks to Konstantin Goncharik for the PR. - Optimized reconfiguration in CMake giving up to 60% time save (6-20 seconds).
- Simplified Profile Guided Optimization (PGO) gathering and usage due to new
-
Documentation and diagnostics:
- More information on Mongo heartbeat in logs.
- Added docs about tag name of tracing::ScopeTime.
- Improved PostgreSQL diagnostic messages for server response parsing errors due to C++ and DB types mismatch.
- Better samples and docs for utils::statistics::Writer.
- Added direct database access to testsuite samples.
- Updated the Concurrent Queues docs.
- Log formats message was amended. Thanks to tkhanipov for the PR!
2.5
Changes since v2.4:
-
Added S3 API client s3api::Client. Many thanks to v-for-vandal for the work!
-
Added gRPC reflection library. Many thanks to v-for-vandal for the work!
-
Added Kill Switch functionality. Many thanks to Aksenov Anton for the work!
-
Congestion Control turned on by default.
-
Initial work towards embedding GDB pretty-printers to userver binaries.
-
Mongo now has the full functionality for diagnostics out-of-the box, without mongo-c library patches.
-
Simplified contributing by removing the annoying bot that checks for explicit agreement to CLA. Creating an issue or sending a PR already means agreement with CLA. Added notes to PR and Issue creation to highlight that.
-
Basic support for HTTP/2 body streaming.
-
Kafka support in testsuite implemented. See Functional tests section at Kafka service tutorial.
-
gRPC:
- Safe new interface for gRPC server handlers. Old interface will be removed in next release.
- Added support for TLS in gRPC.
- Added ugrpc::server::middlewares::field_mask::Component for masking and trimming messages. Many thanks to TTPO100AJIEX for the work!
- gRPC clients now allow configuring channels count for particular methods via
dedicated-channel-countsstatic config option.
-
Optimizations:
- concurrent::MpscQueue was optimized, leading to x2-x3 better performance.
- rcu::Variable deleter now can be chosen at compile time, leading to smaller size of rcu::Variable if no asynchronous deletion required.
- Multiple optimizations for gRPC logging and message visitations via ugrpc::VisitFieldsRecursive(). Many thanks to TTPO100AJIEX for the work!
-
Build:
- Added
userver_module()CMake function to simplify configuration of new drivers that are being added to userver. - Added missing
fmt/ranges.hincludes. Thanks to Vasilii Kuziakin and to SidorovichPavel for the PRs! - Proper use of
PROTOBUF_PROTOCin CMake. Thanks to Nikita for the PR! - Added support for builds in paths that contain whitespaces and other special symbols.
- Added CI build tests for Ubuntu 24.04 and MacOS.
- Switched to Conan v2. Many thanks to Anton for the PR! Also use modern versions of third party libraries in Conan.
- Added
-
Documentation and diagnostics:
- A whole new build dedicated section was added to the docs instead of the old "Configure, Build and Install" page.
- Improved schemes validation messages, including config validation messages because no schema is written.
- Disambiguated diagnostic messages for component system.
- Better log messages for the dist locks.
- Better docs for gRPC middlewares and gRPC logs at gRPC.
- Added topology and heartbeats logs and metrics for Mongo.
- Clarified docs on PostgreSQL data types with timezones. See uPg: Supported data types.
- Added Kafka service tutorial.
- Logging at runtime, Congestion Control documentation rewrite.
2.4
Changes since v2.3:
- Added USERVER_LOG_REQUEST_HEADERS_WHITELIST to control the HTTP headers to log.
- OpenTelemetry protocol (OTLP) now can optionally do only logging or only tracing. Thanks to TertiumOrganum1 for the PR!
- The framework now accepts OTLP headers for tracing by default and puts those headers for new requests.
- PostgreSQL span names are now a little bit more informative. Thanks to TertiumOrganum1 for the PR!
- Kafka now has a
client.idstatic option. Many thanks to Nikolay Pervushin for the PR. - PostgreSQL type errors become more informative. Thanks to farmovit for the report!
- Optimizations:
- HTTP/2 server implementation now does not copy data to send, saving CPU and RAM.
- HTTP/2 now relies on open-addressing unordered map from nghttp2, leading to faster stream lookup.
- Kafka consumer now does not block a task processor thread, allowing multiple consumers to share the same OS thread. Consume cycle now can be treated as an asynchronous non-blocking event loop.
- Kafka producer delivery acknowledgments processing is now done in parallel, leading to better scalability. Also it does not block the OS thread when waiting for new delivery acknowledgments.
- Internals of all the Sockets became smaller in size, saving some RAM.
- gRPC:
- gRPC in testsuite now automatically calls pytest_userver.client.Client.update_server_state. The behavior now matches HTTP.
- gRPC server now supports unix-sockets via
unix-socket-pathstatic config option. - gRPC clients now log requests/responses via the ugrpc::client::middlewares::log::Component middleware. Improved gRPC client and server.
- New component ugrpc::client::CommonComponent with common options for all the gRPC clients.
- Build, Install and CI:
- OTLP build is now supported in Conan. Thanks to Amina Ramazanova for the PR!
- Chaotic now exposes less headers, leading to faster build times.
- Fixed compilation on modern Boost.UUID. Thanks to Alexander Botev for the PR!
- Added
dependabotto CI and updated the dependencies. Thanks to Dzmitry Ivaniuk for the PR! - Added missing
#include. Thanks to Nikita for the PR! - Removed outdated defines in the core. Thanks to Sergey Kazmin for the PR!
- Install now does not put third party headers into the top level include directory. Multiple unused files are now not installed.
- Started the work to enable builds in directories with whitespace in names.
- Documentation:
- More docs for gRPC middlewares at gRPC and gRPC middleware.
- More docs for otlp::LoggerComponent. Thanks to TertiumOrganum1 for the PR!
- Set proper
Content-Typein samples.