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

perf(lsp): add built-in tracing support for the LSP #27843

Merged
merged 15 commits into from
Feb 12, 2025

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Jan 27, 2025

adds tracing and opentelemetry exporting to the LSP.

enable it in .vscode/settings.json (or wherever you configure the LSP), like

{
  "deno.tracing": true
}

which will by default export opentelemetry traces to localhost:4317
or

{
  "deno.tracing": {
    // all fields optional
     "collector": "openTelemetry" (default) | "logging" (output in lsp log window)
     "collectorEndpoint": "http://localhost:4318" (for opentelemetry)
     "enable": true | false,
     "filter": "info" // defaults to "info", but can be any span filter
   }
}

a full working setup would be

1: Run jaeger (an opentelemetry collector with a nice UI):

docker run --rm -p 16686:16686 -p 4317:4317 jaegertracing/jaeger
  1. Enable in .vscode/settings.json
{
  "deno.tracing": true
}
  1. Restart LSP (right now it only will start the opentelemetry exporter on LSP startup)
  2. open http://localhost:16686 in your browser

@CLAassistant
Copy link

CLAassistant commented Feb 11, 2025

CLA assistant check
All committers have signed the CLA.

@nathanwhit nathanwhit force-pushed the lsp-tracing-redux branch 5 times, most recently from ecec89d to 0cd4eec Compare February 12, 2025 10:26
@@ -1331,6 +1386,8 @@ impl Inner {
self.config.set_workspace_settings(settings, vec![]);
}
};
// TODO(nathanwhit): allow updating after startup, needs work to set thread local collector on tsc thread
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to actually address this? If not, then open an issue so it doesn't get lost

@nathanwhit nathanwhit merged commit 55c5b07 into denoland:main Feb 12, 2025
18 checks passed
@nathanwhit nathanwhit deleted the lsp-tracing-redux branch February 12, 2025 16:40
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.

3 participants