Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component: Tracing #5238

Open
19 tasks
StachuDotNet opened this issue Jan 8, 2024 · 0 comments
Open
19 tasks

Component: Tracing #5238

StachuDotNet opened this issue Jan 8, 2024 · 0 comments
Assignees

Comments

@StachuDotNet
Copy link
Member

StachuDotNet commented Jan 8, 2024

This issue is to organize work not in-progress, related to Tracing.

"Tracing" in Darklang is a pluggable, continuous thing that you can hook into and leverage. It supports debuggability, refactoring, and more. Our goal is to keep this a holistic part of Dark.

Work here isn't quite accessible at the moment. There are large refactors pending in this space, and tracing hasn't been reintegrated into the new editing environment yet.

core

mostly relevant to editor


personal notes to process later - I'll know what these mean

  • trace: start/enter CLI
  • trace: specific input
    • fn call
    • http
  • connect traces across wire by including traceId

More notes to process:

# Dark Tracing Notes and Plans

## Relevant Stuff
- code
  - LibExe/AnalysisTypes.fs
  - LibExe/Interpreter.fs
  - LibExe/RuntimeTypes.fs
  - LibCloud/TraceCloudStorage.fs
  - LibCloud/Tracing.fs
  - Tests/StorageTraces.Tests.fs
  - module Tests.StorageTraces
  - Server.fs (BwdDanger and Bwd)
  - DangerExecution.fs
  - BuiltinDarkInternals/F404s.fs
  - CronChecker
- the `traces_v0` postgres table
    ```
    CREATE TABLE IF NOT EXISTS
    traces_v0
    ( id UUID PRIMARY KEY DEFAULT gen_random_uuid()
    , canvas_id UUID NOT NULL
    -- the handler's (or for a function's default trace, the function's) TLID (used to
    -- store the trace data in Cloud Storage)
    , root_tlid BIGINT NOT NULL
    , trace_id UUID NOT NULL
    , callgraph_tlids BIGINT[] NOT NULL -- functions called during the trace
    );
    ```

is dotnet-trace relevant at all?

## Plans
- [ ] fill this all out

## Questions & TODOs:
- [ ] Q: how do I get this accessible to Dark users to play with?
  - we need some analysis endpoints I guess
  - and a REPL...

additional notes that need processing

  • traces across runtimes
  • run a cli and get a trace id back
  • see that trace data in an endpoint of dark-editor
  • dark-editor is a runtime
  • traceInternals: bool
    • i.e. package lookup
  • include processor info
  • research distributed tracing
  • probably worth studying other microservice and general architectural patterns
  • lay out the idea of an LSP-managed context of editing,
  • and insert lil' trace things at relevant points in the editor
  • (i.e. play button)
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

No branches or pull requests

1 participant