Skip to content

Improve logging/tracing  #581

@Yohe-Am

Description

@Yohe-Am

Some of the logs/traces emitted seem very adhoc. They contain very little context info and what ought to be trace level logs being present in debug prove a challenge to debugging.

Edit: worst offenders seem to be the ones present in the typescript section of the typegate. The rust logs have the function's type_path.

A general improvement in instrumentation and maybe OpenTelemetry for the typegate seems like a good idea. Instrumenting a large code-base in general is a bit daunting so best to start picking away at the mountain early.

  • remove the verbose boolean flag construct from typegate
  • strictly adhere the following format in typegate
logger.level(`static msg`, variable1, { namedvariable1, namedVariable2})
  • use the new deno otel features
  • replace logs before doing action with opening tracing spans instead
  • add json format backend to the logger. (in prod, use json output, Deno.inspect otherwise)
  • Use no-console lint
  • Go through each logging line in the typegate and re-evaluate it (they're mostly useless/can be replaced with trace spans) (use LLM based agent)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestjavascriptPull requests that update Javascript codemeta-clipr:rustPull requests that update Rust codetypegate

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions