Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/runsidekick/sidekick-agent-python

Python agent for Sidekick open-source live application debugger
https://github.com/runsidekick/sidekick-agent-python

debugging debugging-tool logging monitoring

Last synced: 3 months ago
JSON representation

Python agent for Sidekick open-source live application debugger

Awesome Lists containing this project

README

        





Sidekick Python Agent


Sidekick Licence 
Sidekick Discord Channel 
Foresight monitoring 
Sidekick Sandbox 


Sidekick Main Repository »

Table of Contents



  1. What is Sidekick?



  2. Sidekick Python Agent


  3. Usage


  4. Build the agent



  5. Official Sidekick Agents


  6. Resources

  7. Questions? Problems? Suggestions?

  8. Contact

## What is Sidekick?
Sidekick is a live application debugger that lets you troubleshoot your applications while they keep on running.

Add dynamic logs and put non-breaking breakpoints in your running application without the need of stopping & redeploying.

Sidekick Open Source is here to allow self-hosting and make live debugging more accessible. Built for everyone who needs extra information from their running applications.



##### Sidekick Actions:
Sidekick has two major actions; Tracepoints & Logpoints.

- A **tracepoint** is a non-breaking remote breakpoint. In short, it takes a snapshot of the variables when the code hits that line.
- **Logpoints** open the way for dynamic(on-demand) logging to Sidekick users. Replacing traditional logging with dynamic logging has the potential to lower stage sizes, costs, and time for log searching while adding the ability to add new logpoints without editing the source code, redeploying, or restarting the application.

Supported runtimes: Java, Python, Node.js

To learn more about Sidekick features and capabilities, see our [web page.](https://www.runsidekick.com/?utm_source=sidekick-python-readme)







Learn More »

(back to top)

# Sidekick Python Agent

Sidekick Python agent allows you to inject tracepoints (non-breaking breakpoints) and logpoints dynamically to capture call stack snapshots (with variables) and add log messages on the fly without code modification, re-build and re-deploy. So it helps you, your team, and your organization to reduce MTTR (Minimum Time to Repair/Resolve).

To achieve this, Sidekick Python Agent makes use of [Google Python Cloud Debugger Agent's](https://github.com/GoogleCloudPlatform/cloud-debug-python) breakpoint implementations under the hood.

The advantage of Sidekick over classical APM solutions is that, Sidekick

- can debug and trace any location (your code base or 3rd party dependency) in your application, not just the external (DB, API, etc ...) calls like APM solutions
- has zero overhead when you don't have any tracepoint or logpoint but APMs have always
- doesn't produce too much garbage data because it collects data only at the certain points you specified as long as that point (tracepoint/logpoint) is active

## Usage

Follow the below steps to install Sidekick Agent Python to your application.

- Install the latest Sidekick agent: ```pip install sidekick-agent-python```

Configure the agent via [exporting environment variables](https://docs.runsidekick.com/installation/installing-agents/python/installation#configure-by-environment-variables?utm_source=sidekick-python-readme) or [creating .env file](https://docs.runsidekick.com/installation/installing-agents/python/installation#configure-by-.env-file?utm_source=sidekick-python-readme) and load it in source code.

[Docs](https://docs.runsidekick.com/installation/installing-agents/python?utm_source=sidekick-python-readme)

**ARM64 & M1 support:** Currently ARM64 packages are not published to PyPI directory. They will be published soon and you can build the agent yourself to make use of it on an ARM machine.

## Build

##### Prerequisites
- pipenv

Activate pipenv with the following command and install dependencies mentioned in Pipfile.

```
pipenv shell
```
```
pipenv install
```

Build tracepointdebug.

Check if "setup.cfg" file is created or not

```
./build.sh
```

Check if build directory is created or not. If it is not created, run the following command to generate the source and the distribution binary.

```
./build_tools/build_wheels.sh
```

## Debugging the agent

To debug Sidekick Python Agent, add "build/lib.*/tracepointdebug" by creating a soft link in the application directory and configure your app according to Sidekick docs.
Make sure your project's Python version is the same with Sidekick Python Agent's version.

## Official Sidekick Agents

- [Java](https://github.com/runsidekick/sidekick-agent-java)
- [Node.js](https://github.com/runsidekick/sidekick-agent-nodejs)
- [Python](https://github.com/runsidekick/sidekick-agent-python)

## Resources:

- [Documentation](https://docs.runsidekick.com/?utm_source=sidekick-python-readme)
- [Community](https://github.com/runsidekick/sidekick/discussions)
- [Discord](https://www.runsidekick.com/discord-invitation?utm_source=sidekick-python-readme)
- [Contributing](https://github.com/runsidekick/sidekick/blob/master/CONTRIBUTING.md)
- [Sidekick Main Repository](https://github.com/runsidekick/sidekick)

## Questions? Problems? Suggestions?

To report a bug or request a feature, create a [GitHub Issue](https://github.com/runsidekick/sidekick-agent-python/issues). Please ensure someone else has not created an issue for the same topic.

(back to top)

## Contact

[Reach out on the Discord](https://www.runsidekick.com/discord-invitation?utm_source=sidekick-python-readme). A fellow community member or Sidekick engineer will be happy to help you out.

(back to top)