matrix-org / matrix-org/matrix-js-sdk

Add option for MatrixClient.initRustCrypto() to disable tracing

Open
#4,177 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Developer-Experience A-Element-R T-Enhancement
Dominant language
TypeScript
Stars
2.2k
Forks
704
Avg merge
1d 20h
Merged PRs (30d)
40

Description

The tracing option is by default turned on in the initRustCrypto function (rust-crypto module). This results in excessive logging information with no control over the logging levels.

new RustSdkCryptoJs.Tracing(RustSdkCryptoJs.LoggerLevel.Debug).turnOn(); // Line 94 in src/rust-crypto/index.ts

When MatrixClient.initRustCrypto() calls it, it does not have options to disable tracing or adjust its logging level. In the Rust SDK, this tracing/logging level can be set with an environment variable. In matrix-js-sdk, however, it seems to be hard-coded.

Can we either use a similar environment variable, or have it as an optional parameter in the init function?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/rust-crypto/index.ts at the Tracing call around line 94, then trace how MatrixClient.initRustCrypto() invokes it. Review the Rust SDK's environment-variable behavior and the init function's existing options. Done means callers can control whether tracing is enabled or its logging level, with the resulting behavior covered by the relevant tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, typescript
Domain
cryptography
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.