Bug: [ENHANCEMENT] Make `redis_interface` crate agnostic of `router_env` dependencies




diff --git a/Cargo.lock b/Cargo.lock
index d5dc4e2ee9f..e6278079b20 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5365,11 +5365,11 @@ dependencies = [
  "error-stack",
  "fred",
  "futures 0.3.30",
- "router_env",
  "serde",
  "thiserror",
  "tokio 1.37.0",
  "tokio-stream",
+ "tracing",
 ]
 
 [[package]]
diff --git a/Cargo.toml b/Cargo.toml
index 82687a32ba6..fc2095275d3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,6 +5,9 @@ package.edition = "2021"
 package.rust-version = "1.70"
 package.license = "Apache-2.0"
 
+[workspace.dependencies]
+tracing = { version = "0.1.40" }
+
 [profile.release]
 strip = true
 lto = true
diff --git a/crates/redis_interface/Cargo.toml b/crates/redis_interface/Cargo.toml
index 1fb74be79d9..d55ff86bcea 100644
--- a/crates/redis_interface/Cargo.toml
+++ b/crates/redis_interface/Cargo.toml
@@ -15,10 +15,10 @@ serde = { version = "1.0.197", features = ["derive"] }
 thiserror = "1.0.58"
 tokio = "1.37.0"
 tokio-stream = {version = "0.1.15", features = ["sync"]}
+tracing = { workspace = true }
 
 # First party crates
 common_utils = { version = "0.1.0", path = "../common_utils", features = ["async_ext"] }
-router_env = { version = "0.1.0", path = "../router_env", features = ["log_extra_implicit_fields", "log_custom_entries_to_extra"] }
 
 [dev-dependencies]
 tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread"] }
diff --git a/crates/redis_interface/src/commands.rs b/crates/redis_interface/src/commands.rs
index 46e3a35fd33..504820822c0 100644
--- a/crates/redis_interface/src/commands.rs
+++ b/crates/redis_interface/src/commands.rs
@@ -23,7 +23,7 @@ use fred::{
     },
 };
 use futures::StreamExt;
-use router_env::{instrument, logger, tracing};
+use tracing::instrument;
 
 use crate::{
     errors,
@@ -379,7 +379,7 @@ impl super::RedisConnectionPool {
                         Some(futures::stream::iter(v))
                     }
                     Err(err) => {
-                        logger::error!(?err);
+                        tracing::error!(?err);
                         None
                     }
                 }
diff --git a/crates/redis_interface/src/lib.rs b/crates/redis_interface/src/lib.rs
index 0ab1ea394c9..df74d728331 100644
--- a/crates/redis_interface/src/lib.rs
+++ b/crates/redis_interface/src/lib.rs
@@ -26,7 +26,6 @@ use common_utils::errors::CustomResult;
 use error_stack::ResultExt;
 pub use fred::interfaces::PubsubInterface;
 use fred::{interfaces::ClientLike, prelude::EventInterface};
-use router_env::logger;
 
 pub use self::types::*;
 
@@ -189,10 +188,10 @@ impl RedisConnectionPool {
         let mut error_rx = futures::stream::select_all(error_rxs);
         loop {
             if let Some(Ok(error)) = error_rx.next().await {
-                logger::error!(?error, "Redis protocol or connection error");
+                tracing::error!(?error, "Redis protocol or connection error");
                 if self.pool.state() == fred::types::ClientState::Disconnected {
                     if tx.send(()).is_err() {
-                        logger::error!("The redis shutdown signal sender failed to signal");
+                        tracing::error!("The redis shutdown signal sender failed to signal");
                     }
                     self.is_redis_available
                         .store(false, atomic::Ordering::SeqCst);
@@ -205,7 +204,7 @@ impl RedisConnectionPool {
     pub async fn on_unresponsive(&self) {
         let _ = self.pool.clients().iter().map(|client| {
             client.on_unresponsive(|server| {
-                logger::warn!(redis_server =?server.host, "Redis server is unresponsive");
+                tracing::warn!(redis_server =?server.host, "Redis server is unresponsive");
                 Ok(())
             })
         });
diff --git a/crates/router_env/Cargo.toml b/crates/router_env/Cargo.toml
index 3b95d5f22fd..b9b1184fedf 100644
--- a/crates/router_env/Cargo.toml
+++ b/crates/router_env/Cargo.toml
@@ -22,7 +22,7 @@ serde_path_to_error = "0.1.16"
 strum = { version = "0.26.2", features = ["derive"] }
 time = { version = "0.3.35", default-features = false, features = ["formatting"] }
 tokio = { version = "1.37.0" }
-tracing = { version = "0.1.40" }
+tracing = { workspace = true }
 tracing-actix-web = { version = "0.7.10", features = ["opentelemetry_0_19", "uuid_v7"], optional = true }
 tracing-appender = { version = "0.2.3" }
 tracing-attributes = "0.1.27"

…ndency for redis_interface

## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description

This PR removes `router_env` as a dependency of `redis_interface` crate. To accomplish this we declare `tracing` as a workspace dependency and use that individually in `redis_interface` and `router_env`.

<!-- Describe your changes in detail -->


### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables

<!--
Provide links to the files with corresponding changes.

Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->


## Motivation and Context

This is done to make `redis_interface` more self-sufficient and improve its usage as a autonomous dependency.

<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->


## How did you test it?

This is dependency relocation, no domain logic or framework code was changed
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->


## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
