Skip to content

Avoid recording SQL arguments via tracing::instrument#3047

Open
WaterWhisperer wants to merge 1 commit intoSeaQL:masterfrom
WaterWhisperer:fix/instrument-span-params
Open

Avoid recording SQL arguments via tracing::instrument#3047
WaterWhisperer wants to merge 1 commit intoSeaQL:masterfrom
WaterWhisperer:fix/instrument-span-params

Conversation

@WaterWhisperer
Copy link
Copy Markdown
Contributor

PR Info

New Features

  • None.

Changes

  • Skip raw stmt / sql arguments in #[instrument] generated spans across database execution paths.
  • Keep record_stmt_in_spans responsible only for manual db.statement recording.

@WaterWhisperer
Copy link
Copy Markdown
Contributor Author

record_stmt_in_spans in #3045 already separately controls manual db.statement recording. The remaining leakage here comes from #[instrument] automatically recording function arguments like stmt / sql into spans.

I did not turn that into another runtime option, because this part is driven by the #[instrument] macro itself. Making it configurable would likely require replacing these macro-generated spans with a different manual tracing path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tracing-spans] Add option to remove params from traces

1 participant