wrap-cli icon indicating copy to clipboard operation
wrap-cli copied to clipboard

Simple console tracing

Open fetsorn opened this issue 3 years ago • 0 comments

Resolves #1001

Features

  • added an OpenTelemetry exporter for console.log - @fetsorn/opentelemetry-console-exporter
    • 1st column: unique and random icons represent trace hierarchy
    • 2nd column: duration of each span, currently in milliseconds
    • 3rd column: function names or detailed trace annotations
    • an object with arguments and output of each method, along with annotations
    • works both in browser and node
  • added detailed trace annotations to some of the main functions - invoke, load, resolveUri
  • added tracing level and detalization to client configuration
  • added missing tracing controls to React provider
  • updated openTelemetry dependencies

Changes to review

  • client configuration now has another two optional parameters. Haven't merged them into a TracingConfig type because it would be harder to set their values.
    • TracingLevel: only functions with equal or higher priority are traced
    • TracingDetailed: boolean switch between concise and detailed console export
  • removed inspect from the tracing library
  • added an external dependency to the exporter
  • tracing methods (traceMethod, startSpan, setAttribute etc.) now take an optional parameter tracingLevel that raises priority over the default TracingLevel.Low.
export enum TracingLevel {
 Low = 0,
 Medium,
 High,
}
There's screenshots under the thing Screen Shot 2022-07-13 at 11 23 17 Screen Shot 2022-07-14 at 14 50 12 Screen Shot 2022-07-13 at 11 22 46 Screen Shot 2022-07-13 at 11 23 38

fetsorn avatar Jul 13 '22 07:07 fetsorn