DevZero Logo
DevZero

ODA

Overview of ODA on DevZero

What is ODA?

Open Developer Analytics or ODA is an open-source tool that tracks essential metrics such as execution times, CPU and memory usage, and spawned processes from commands executed in a shell. These metrics help teams identify inefficiencies and improve workflows. Aggregated metrics are displayed in the DevZero DXI Dashboard, providing engineering leaders with actionable insights for process optimization.

What Does ODA Track?

Once installed and running, ODA monitors the following metrics:

  • Execution Times: Time taken for commands to execute.
  • Resource Usage: CPU and memory usage for commands.
  • Command Success and Failure Rates: Highlights the efficiency and reliability of commands.
  • Developer Idle Time: Quantifies delays caused by waiting for commands to complete.
  • Processes Spawned: Tracks additional processes triggered by executed commands.

These metrics are aggregated across teams and visualized on the DevZero DXI Dashboard, providing actionable insights into developer workflows. This will help to pinpoint inefficiencies and provide opportunities for optimization.

Ideal Scenario for ODA

  • Team Performance Tracking:

Analyze metrics like developer idle time, PR cycles, and throughput.

Identify areas that slow progress, such as resource-heavy operations or PR rework.

  • Workflow Optimization:

Highlight and reduce resource-intensive processes.

Enable teams to benchmark and streamline operations using aggregated data.

  • Real-Time Insights:

Provide leaders with a dashboard to monitor overall team productivity and efficiency.

Prerequisites

The following tools are needed to setup ODA on your local machine:

Setting up ODA

Configuring ODA

ODA provides various options to configure ODA and change it to your preference. For example, if you want more verbose outputs for your output, you can enable the debug mode.

These configurations can be toggled by navigating to the ~/.oda/config.toml file and editing the file.

The configuration file looks like this:

# Whether debug mode is enabled. Debug mode provides more verbose output for troubleshooting.
# Default: false
debug = false
 
# Interval in seconds between collections of general process information.
# This setting controls how often the system checks and collects data on all processes.
# A lower value increases the frequency of data collection, potentially leading to higher resource usage.
# Default: 120 seconds
# process_interval = 3600
 
# Interval in seconds to collect information about processes when a command has been executed.
# This is useful for getting more granular data following specific events.
# Default: 1 second
# command_interval = 1
 
# Degree of the polynomial used for calculating the backoff interval. This value determines how
# rapidly the interval increases after each command execution. Higher degrees result in faster
# increases. This setting allows for adaptable monitoring frequencies based on the application's
# performance and needs.
# Default: 3 (Cubic growth)
# Possible values:
#   2 - Quadratic growth: Moderate increase, suitable for regular updates.
#   3 - Cubic growth: Rapid increase, useful when decreasing the frequency of updates more quickly.
#   4 - Quartic growth: Very rapid increase, best for scenarios where updates become less critical swiftly.
# command_interval_multiplier = 3
 
# Maximum duration for the command interval. This value caps the collection interval to prevent
# excessively long wait times between command executions, ensuring that monitoring remains
# responsive even as intervals extend. Ideal for maintaining a balance between performance
# and system load.
# Default: 3600 seconds (1 hour)
# max_duration = 3600
 
# Multiplier for the command interval. This value extends the collection interval after a command execution,
# allowing for extended monitoring of processes post-execution.
# Default: 5
# command_interval_multiplier = 5
 
# Maximum number of commands that can be collected concurrently.
# This limit helps to control resource usage by limiting how many commands are processed at the same time.
# Default: 20
# max_concurrent_commands = 20
 
# Flag to enable or disable remote collection of data.
# When enabled, process data will be collected not just locally but also from configured remote sources.
# When this is enabled, 'server_host' and 'server_port' must be specified.
# Default: false
remote_collection = true
 
# The server host address for remote collection.
# This is required when 'remote_collection' is enabled and specifies the remote server to connect to.
# Default: (empty)
server_host = "pulse.devzero.io:443"
 
# Regular expression pattern to exclude certain processes from being collected.
# This can be used to omit sensitive or irrelevant processes from the data collection.
# Default: (empty, meaning no processes are excluded)
# exclude_regex = ""
 
# Regular expression pattern to exclude certain commands from being collected.
# This can be used to omit sensitive or irrelevant processes from the data collection.
exclude_commands = ["^vim", "^nano", "^less", "^top", "^htop", "^ssh", "^scp", "^rsync", "^screen", "^tmux", "^dz", "^oda"]
 
# Whether to establish a secure connection for remote data collection.
# When enabled, data transmitted to and from the remote server will be encrypted.
# Requires 'cert_file' to be specified if true.
# Default: false
secure_connection = true
 
# Path to the certificate file used for establishing a secure connection.
# This file should contain the SSL certificate when 'secure_connection' is enabled.
# Default: (empty)
# cert_file = ""
 
# Specifies the type of process collection mechanism to use.
# Options are 'ps' for basic process status information and 'psutil' for more detailed data, depending on system support.
# Default: "ps"
# process_collection_type = "ps"
 
# Specifies the team identifier that will be used to mark the collection of data for that team
# Default: (empty)
# team_id = ""
 
# Specifies the user identifier that will be used to make the collection of data for that user
# Default: (empty)
# user_id = ""
 
# Specifies the user identifier that will be used to make the collection of data for that user
# Default: (empty)
# user_email = ""
 
# Specifies the user identifier that will be used to make the collection of data for that workspace
# Default: (empty)
# workspace_id = ""

After you have made your changes, you need to reload ODA, by running:

sudo dz oda stop && sudo dz oda start

Troubleshooting

If you see a blank dashboard like this one, your ODA Daemon might not be setup correctly.

Blank Dashboard

To fix this issue, follow these steps:

You must uninstall the existing ODA Daemon on your DZ CLI.

dz oda stop && dz oda uninstall

Uninstall any existing configuration folder that might still be in use for ODA Daemon.

rm -rf ~/.oda

Then restart your Terminal by closing it and opening it again.

After this, update your DZ CLI.

sudo dz cli update

Install ODA Daemon again.

dz oda install --shell=all -n -a

Start your ODA server.

dz oda start

On this page