Skip to content

JetBrains Plugin Quick Tour

The majority of the work you do with Lightrun, such as troubleshooting, debugging, and performance testing, is performed directly from your integrated development environment (IDE) or the Lightrun CLI.

Using the Lightrun plugin, provided for a variety of popular IDEs (such as VSCode, IntelliJ, and PyCharm), you can insert Lightrun actions (Logs, Metrics, and Snapshots) anywhere within the source code of your running applications. Also, from within the Lightrun plugin for your IDE, you can view, in real time, the output of Lightrun actions.

And, thanks to Lightrun's comprehensive range of integrations with third-party logging tools, from the plugin, you also can route output from Lightrun Logs and Metrics to your usual logging framework (such as Logz.io and DataDog).

Scope of the quick tour

This quick tour guide provides an overview of the main features and functionalities of the Lightrun Plugin for JetBrains(Intellij IDEA, Webstorm, Pycharm).

For more detailed information on the procedures involved in running and managing Lightrun actions in your JetBrains IDE(Intellij IDEA, Webstorm, Pycharm), see:

Prerequisites

These instructions assume that you have:

  • Attached at least one agent to your app
  • Opened the source code file for the running application from the IDE

The JetBrains Plugin

Once you have authenticated the Lightrun plugin in your JetBrains IDE, your JetBrains IDE user interface should appear similar to the following image.

The Lightrun plugin

The following table describes the sections of the interface as numbered above:

Sections Description
1 Lightrun tool window - Authenticate your plugin, manage Lightrun actions and tags.
2 Lightrun Console tool window - Manage dynamic logs and metrics.
3 Lightrun Snapshot tool window - Manage snapshots.
4 JetBrains Code Editor - JetBrains code editior.
5 Lightrun LogOptimizer(™) - Lightrun LogOptimizer(™)

The following sections describes the different parts in detail:

The Lightrun tool window

The Lightrun tool window is part of the IntelliJ right-hand sidebar, and appears similarly to the following image

The Lightrun sidebar -third

The Lightrun tool window has three tabs:

Note

Please note that the Agent and Tag tabs display only actively running agents and tags in your IDE. If both tabs are empty or only the agent tab is empty, please contact your manager for assistance.

Agents tab

The Agents tab displays a list of all active agents currently attached to your JetBrains IDE and all the actions associated with each agent. You can search for agents, view and configure agent details, view action details or delete actions, and configure agent output piping in the Agents tab.

To search for an agent
  1. Enter the agent's name or PID value into the search bar.
  2. Click the Search button.

    The agent lists should appear similar to the following image The Lightrun sidebar -half

  3. Click the drop-left icon Drop left -icon on the left-hand side of an agent to display a list of all actions associated with that agent. The Lightrun sidebar -quarter

The following table describes the icons present in the agents and action lists and the functions of each icon.

Icon Function
1 View details -icon Opens the information dialog box for the agent, tag, or action
2 View/hide dynamic logs -icon Toggle this button to hide/show dynamic logs in the editor. This applies to the hierarchy and can be toggled globally on the login button.
3 Pipe dynamic logs -icon Use this icon to configure an agent output piping. See Viewing action output for more details.
4 Delete -icon Delete agent or tag actions. Only agent-activated actions can be deleted from the Agents list and tag-activated actions from the Tags list.
5 Go to line -icon Jump to the source file and line number in the code that is associated with the action.
6 Status -icon Toggle to disable or enable an action. Only agent-activated actions can be toggled from the Agents list and tag-activated actions from the Tags list.
7 Status -iconStatus -icon Displays the current state of the action.
- One checks indicates the action was submitted to the server.
- Two checks indicate that it was received by the agent.
- Highlighted checks indicate that the agent accepted the action.
From the Agents list, the tag icon indicates the action was activated with tags and not agents, and its status can be viewed from the Tags list.
8 Log level -icon Indicates the the level that was configured for the log (on log rows only): Info, Debug, Warn, Error.
To view more information about an agent or Lightrun action

Click the information icon View details -icon on the right side of the agent or action. A dialog box will appear on your screen, showing more details about the agent/action.

The agent details dialog box should appear similar to the following image.

View details -half

The following table describes the information present in the dialog box.

Field Description
Host The name of the machine where the agent is runnning.
ID The unique identification number automatically generated for the action.
PID The process ID (for the machine where the agent is running).
Start Time The time at which the agent started running.
API Version The version of the API used by the agent.
Agent Version The version of the agent.
Piping Mode The configured piping method.
Tags All tags that have been applied to this agent.

The action details dialog box should appear similar to the following image.

View details -half

The following table describes the information present in the dialog box.

Field Description
ID The system-generated ID associated with this action item.
Type The type of action.
Location The file and code line where the action starts following behavior.
Create Time The time and day on which the action was created.
Owner The user who created the action.
Quota in effect The quota controls use of CPU, Networking, Memory, excessively long strings, too many instructions printing out, protection from infinite loops and the like.
Quota settings can be tuned in the agent.config file.
Log Message The message resulting from the action appears here, if relevant.
Error Message If any agent reports any errors for this action, they are documented here.

Tags tab

The Tags tab displays a list of all active tags currently attached to Lightrun actions running in your JetBrains IDE.

TO SEARCH FOR A TAG
  1. Enter the tag’s name into the search bar.
  2. Click the Search button.

    The tag list should appear similar to the following image. The Lightrun sidebar -half

  3. Click the drop-left icon Drop left -icon on the left-hand side of the tag listing to display a listing of all actions associated with that tag. The Lightrun sidebar -quarter

The following table describes the icons present in the tags and action listing and the functions of each icon.

Icon Function
1 View details -icon Opens the information dialog box for the agent, tag, or action.
2 Delete -icon Delete any agent or tag actions. Only agent-activated actions can be deleted from the Agents list and tag-activated actions from the Tags list.
3 Go to line -icon Jump to the source file and line number in the code that is associated with the action.
4 Status -icon Toggle to disable or enable an action. Only agent-activated actions can be toggled from the Agents list and tag-activated actions from the Tags list.
5 Status -iconStatus -icon Displays the current state of the action.
- One checks indicates the action was submitted to the server.
- Two checks indicate that it was received by the agent.
- Highlighted checks indicate that the agent accepted the action.
From the Agents list, the tag icon indicates the action was activated with tags and not agents, and its status can be viewed from the Tags list.
6 Log level -icon Indicates the the level that was configured for the log (on log rows only): Info, Debug, Warn, Error.

Actions tab

The Actions tab lists all Lightrun actions (Logs, Metrics, and Snapshots) currently in your system. This includes active actions, disabled actions, expired actions, and actions with errors.

Managing actions with the actions tab

The actions tab appears similar to the following image

Actions tab -half

From the actions tab, you can:

  • Search for actions with their filename and line number.
  • Disable actions
  • Filter actions with the active, expired, and error statuses.
  • Filter actions with their filename and creation time.

The following table describes the icons present in front of each action.

Icon Function
1 View details -icon Opens the information dialog box for the agent, tag, or action.
2 Delete -icon Delete any agent or tag actions. Only agent-activated actions can be deleted from the Agents list and tag-activated actions from the Tags list.
3 Go to line -icon Jump to the source file and line number in the code that is associated with the action.
4 Status -icon Toggle to disable or enable an action. Only agent-activated actions can be toggled from the Agents list and tag-activated actions from the Tags list.
5 Status -iconStatus -icon Displays the current state of the action.
- One checks indicates the action was submitted to the server.
- Two checks indicate that it was received by the agent.
- Highlighted checks indicate that the agent accepted the action.
From the Agents list, the tag icon indicates the action was activated with tags and not agents, and its status can be viewed from the Tags list.
6 Log level -icon Indicates the the level that was configured for the log (on log rows only): Info, Debug, Warn, Error.

Lightrun Console

Lightrun dynamic logs and metrics appear in real-time in the Lightrun Console when you enable Both or Plugin piping configurations in the Lightrun toolwindow (See action output routing). To open the console, click Lightrun Console on the bottom part of your JetBrains IDE.

The Lightrun Console appears similar to the following gif.

The Lightrun Console

  • Enter an expression or name into the search bar to display only logs and metrics with that expression/name in the Lightrun Console.
  • Use the filters at the top right of the Lightrun Console to filter the dynamic logs or metrics relevant to your investigation.

Lightrun Snapshot

The Lightrun Snapshot tool window allows you to view and configure your snapshot data directly in your JetBrains IDE. To open the tool window, click Lightrun Snapshots on the bottom part of your JetBrains IDE.

The Lightrun snapshot section appears similar to the following image

Lightrun snapsot

The following table describes the sections of the Lightrun snapshot interface as numbered above:

Sections Description
1 Snapshot data - A list of snapshots and their creation details.
2 Stacktrace - Stacktrace details.

The following sections describes the different parts in detail:

Snapshot data

The snapshot data section provides access to a list of all available snapshots and their creation details. The snapshot data section appear similar to the following image.

Lightrun snapsot -half

The follow table describes the data available in the Snapshot data section.

Column Description
CREATION TIME The time at which the snapshot was created
LOCATION The line of code at which the snapshot was inserted.
TARGET The agent or tag to which the snapshot was attached.
HIT The amount of time a snapshot hit was captured.
STATUS The snapshot status. Can be Active, Done, or Deleted.

Snapshot stacktrace

The Snapshot stacktrace section displays a snapshot stacktrace. The section appear similar to the following image.

Lightrun snapsot -half

Click on a snapshot in the Snapshot data section to view its stacktrace in the Stacktrace section.

The follow table describes the data available in the Snapshot stacktrace section.

Column Description
CAPTURE TIME The time at which the snapshot hit was captured.
FRAMES The snapshot frames.
VARIABLES The snapshot frame variables.
  • Click on a CAPTURE TIME to display the frames recorded during that captured time.
  • Click on a FRAME to display the frame's variables.

Lightrun Section


Last update: May 29, 2023