MCPcopy
hub / github.com/solo-io/squash

github.com/solo-io/squash @v0.5.19 sqlite

repository ↗ · DeepWiki ↗ · release v0.5.19 ↗
1,865 symbols 3,422 edges 104 files 172 documented · 9%
README

squash Debugger for microservices

Debug your microservice applications from your terminal or IDE while they run in Kubernetes.

Installation   |   Documentation   |   Blog   |   Slack   |   Twitter

Debugging microservices applications is a difficult task. The state of an application is spread across multiple processes, often on different nodes. It is hard to get the holistic view of an application's state. Certain tools exist for troubleshooting microservice issues. OpenTracing can be used to produce transaction or workflow logs for post-mortem analysis. Service meshes like Istio can be used to monitor the network to identify latency problems. Unfortunately, these tools are passive, the feedback loop is slow, and they do not allow you to monitor and alter the application during run time.

In contrast, "traditional" debuggers for monolithic applications provide devs with powerful real-time investigation features. A developer working with monolithic applications has the powerful ability to set breakpoints throughout the application, follow variable values on the fly, step through the code, and change values during run time.

Squash brings the power of modern debuggers to developers of microservice apps. Squash bridges between the apps running in a Kubernetes environment (without modifying them) and the IDE. Users are free to choose which containers, pods, services or images they are interested in debugging, and are allowed to set breakpoints in their codes, follow values of their variables on the fly, step through the code while jumping between microservices, and change these values during run time.

Squash is built to be easily extensible. It is easy to add support for more languages, debuggers and IDEs.

To learn more about the motivation behind project squash, read our blog post or watch session (slides). We also encourage you to read squash technical overview blog.

To stay up-to-date with Squash, follow us @soloio_inc and join us on our slack channel.

Official website

With Squash, you can:

  • Debug running microservices
  • Debug container in a pod
  • Debug a service
  • Set breakpoints
  • Step through code
  • View and modify values of variables
  • ...anything you could do with a regular debugger, and more!

Demo

In the following demo we debug an application that adds two numbers. As you can see, it currently fails miserably at adding 9 to 99. The application is composed of two microservices. We set breakpoints in both, then step through the application, while monitoring its variables. At some point we identify the problem, and test it by changing the value of the variable isadd before resuming the execution of the application.

Squash Demo

An annotated version of this demo can be found here.

Documentation

Please visit squash.solo.io for documentation.

Supported debuggers:

Supported platforms:

Supported IDEs:

Roadmap:

Service Mesh - Squash integrates with Envoy. Read about the Squash HTTP filter, now part of Envoy here. This allows Squash to open debug sessions as a request flows through a microservice. Support for Istio will be added in 2019.

Debuggers - We will be adding support to several additional debuggers in early 2019, including gdb, nodejs, and python.

IDEs - We have simplified the squashctl --machine interface so it is easier to add support for additional IDEs. We will be updating our Intellij extension in early 2019.

We welcome community support for enabling more debuggers and IDEs.

Squash is under active development. APIs and compatibility are subject to change. We welcome community participation to help identify potential bugs and compatibility issues. Please open a Github issue for any problems you may experience, and join us on our slack channel


Thanks

Squash would not be possible without the valuable open-source work of projects in the community. We would like to extend a special thank-you to Kubernetes, gdb and dlv.

Extension points exported contracts — how you extend this code

Remote (Interface)
Debugger interface. implement this to add a new debugger support to squash. [7 implementers]
pkg/debuggers/remote/interface.go
ContainerProcess (Interface)
Get the information of a process that runs in the container. the pid should be in our pid namespace, not in the containe [3 …
pkg/platforms/interface.go
TransitionDebugAttachmentFunc (FuncType)
Option to copy anything from the original to the desired before writing. Return value of false means don't update
pkg/api/v1/debug_attachment_reconciler.sk.go
Metadata (Interface)
(no doc)
editor/vscode/src/kube-interfaces.ts
Local (Interface)
Debugger interface. implement this to add a new debugger support to squash. [6 implementers]
pkg/debuggers/local/interface.go
ContainerLocator (Interface)
Runs in the squash server: Get the container object from its attachment. [2 implementers]
pkg/platforms/interface.go
ApiSyncer (Interface)
(no doc) [2 implementers]
pkg/api/v1/api_event_loop.sk.go
PodSpec (Interface)
(no doc)
editor/vscode/src/kube-interfaces.ts

Core symbols most depended-on inside this repo

sovApi
called by 317
pkg/platforms/kubernetes/alphav1/runtime.go
encodeVarintApi
called by 258
pkg/platforms/kubernetes/alphav1/runtime.go
Size
called by 147
pkg/platforms/kubernetes/alphav1/runtime.go
skipApi
called by 97
pkg/platforms/kubernetes/alphav1/runtime.go
Unmarshal
called by 77
pkg/platforms/kubernetes/alphav1/runtime.go
MarshalTo
called by 72
pkg/platforms/kubernetes/alphav1/runtime.go
Delete
called by 37
pkg/api/v1/debug_attachment_client.sk.go
Write
called by 27
pkg/api/v1/debug_attachment_client.sk.go

Shape

Method 1,409
Function 228
Struct 170
Interface 29
Class 19
TypeAlias 9
FuncType 1

Languages

Go97%
TypeScript3%
Java1%

Modules by API surface

pkg/platforms/kubernetes/alphav1/runtime.go1,258 symbols
pkg/api/v1/debug_attachment.pb.go80 symbols
editor/vscode/src/extension.ts35 symbols
pkg/config/squash.go21 symbols
pkg/api/v1/debug_attachment_client.sk.go21 symbols
test/e2e/session_test.go20 symbols
pkg/squashctl/app.go19 symbols
pkg/api/v1/debug_attachment.sk.go19 symbols
pkg/utils/socket/sockets.go17 symbols
pkg/squashctl/util.go14 symbols
pkg/squashctl/types.go13 symbols
pkg/api/v1/api_snapshot_emitter.sk.go12 symbols

Dependencies from manifests, versioned

com.sparkjava:spark-core[2.7.2,) · 1×
org.json:json20171018 · 1×
@types/mocha2.2.42 · 1×
@types/node7.0.43 · 1×
@types/shelljs0.7.9 · 1×
download7.0.0 · 1×
shelljs0.7.8 · 1×
tslint5.8.0 · 1×
typescript3.2.0 · 1×
vscode1.1.26 · 1×

For agents

$ claude mcp add squash \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact