{"repo":"Quantinuum/diesel-tracing","free":true,"listed":false,"github":"https://github.com/Quantinuum/diesel-tracing","clone":"git clone https://github.com/Quantinuum/diesel-tracing.git","description":"Connection telemetry middleware for diesel and tracing","language":"Rust","stars":23,"topics":["databases","diesel","rust","telemetry","tracing"],"license":"MIT","category":"analytics","readme_excerpt":"diesel-tracing diesel-tracing provides connection structures that can be used as drop in replacements for diesel connections with extra tracing and logging. Usage Feature flags Just like diesel this crate relies on some feature flags to specify which database driver to support. Just as in diesel configure this in your Cargo.toml Instrumentation Trait diesel exposes and Instrumentation trait that has an implementation in this trait as TracingInstrumentation . By default this will record events at DEBUG level as well as any errors at ERROR level. Optionally you can also include the URL of the database connection in these events. See the diesel documentation for the diesel::Instrumentation trait for more information about this trait and its usage. Connection Wrappers The connection wrappers provide an alternative way to add instrumentation to connections, though their utility may be lesser compared to the Instrumentation trait approach. Establishing a connection diesel-tracing has several instrumented connection structs that wrap the underlying diesel implementations of the connection. As these structs also implement the diesel::Connection trait, establishing a connection is done in the same way as the diesel crate. For example, with the postgres feature flag: This connection can then be used with diesel dsl methods such as diesel::prelude::RunQueryDsl::execute or diesel::prelude::RunQueryDsl::get results . Combination with the Instrumentation trait It is possible to use both th","default_branch":null,"files":null,"tree":[],"storefront":"/r/Quantinuum","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Quantinuum/diesel-tracing/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}