Skip to content

Commit 6143506

Browse files
committed
Remove values from OTel traces to not expose PII
Signed-off-by: Caleb Schoepp <caleb.schoepp@fermyon.com>
1 parent 9f56929 commit 6143506

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

crates/factor-outbound-mysql/src/host.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl<C: Client> v2::HostConnection for InstanceState<C> {
5252
self.open_connection(&address).await
5353
}
5454

55-
#[instrument(name = "spin_outbound_mysql.execute", skip(self, connection), err(level = Level::INFO), fields(otel.kind = "client", db.system = "mysql", otel.name = statement))]
55+
#[instrument(name = "spin_outbound_mysql.execute", skip(self, connection, params), err(level = Level::INFO), fields(otel.kind = "client", db.system = "mysql", otel.name = statement))]
5656
async fn execute(
5757
&mut self,
5858
connection: Resource<Connection>,
@@ -66,7 +66,7 @@ impl<C: Client> v2::HostConnection for InstanceState<C> {
6666
.await?)
6767
}
6868

69-
#[instrument(name = "spin_outbound_mysql.query", skip(self, connection), err(level = Level::INFO), fields(otel.kind = "client", db.system = "mysql", otel.name = statement))]
69+
#[instrument(name = "spin_outbound_mysql.query", skip(self, connection, params), err(level = Level::INFO), fields(otel.kind = "client", db.system = "mysql", otel.name = statement))]
7070
async fn query(
7171
&mut self,
7272
connection: Resource<Connection>,

crates/factor-outbound-pg/src/host.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<C: Send + Sync + Client> v2::HostConnection for InstanceState<C> {
7777
self.open_connection(&address).await
7878
}
7979

80-
#[instrument(name = "spin_outbound_pg.execute", skip(self, connection), err(level = Level::INFO), fields(otel.kind = "client", db.system = "postgresql", otel.name = statement))]
80+
#[instrument(name = "spin_outbound_pg.execute", skip(self, connection, params), err(level = Level::INFO), fields(otel.kind = "client", db.system = "postgresql", otel.name = statement))]
8181
async fn execute(
8282
&mut self,
8383
connection: Resource<Connection>,
@@ -91,7 +91,7 @@ impl<C: Send + Sync + Client> v2::HostConnection for InstanceState<C> {
9191
.await?)
9292
}
9393

94-
#[instrument(name = "spin_outbound_pg.query", skip(self, connection), err(level = Level::INFO), fields(otel.kind = "client", db.system = "postgresql", otel.name = statement))]
94+
#[instrument(name = "spin_outbound_pg.query", skip(self, connection, params), err(level = Level::INFO), fields(otel.kind = "client", db.system = "postgresql", otel.name = statement))]
9595
async fn query(
9696
&mut self,
9797
connection: Resource<Connection>,

crates/factor-sqlite/src/host.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl v2::HostConnection for InstanceState {
8383
.map(Resource::new_own)
8484
}
8585

86-
#[instrument(name = "spin_sqlite.execute", skip(self, connection), err(level = Level::INFO), fields(otel.kind = "client", db.system = "sqlite", otel.name = query, sqlite.backend = Empty))]
86+
#[instrument(name = "spin_sqlite.execute", skip(self, connection, parameters), err(level = Level::INFO), fields(otel.kind = "client", db.system = "sqlite", otel.name = query, sqlite.backend = Empty))]
8787
async fn execute(
8888
&mut self,
8989
connection: Resource<v2::Connection>,

0 commit comments

Comments
 (0)