Back to Documentation
Advanced • 25 min read

Custom Metrics

Create and track your own custom metrics tailored to your team's unique needs. Build custom formulas, set alert thresholds, and visualize the data that matters most to you.

What are Custom Metrics?

Custom metrics allow you to define your own KPIs and track measurements specific to your team's goals and processes. While DevLyTicks provides many built-in metrics, custom metrics let you create calculations tailored to your workflow.

Key Capabilities:

  • Formula Builder - Create complex calculations using built-in functions
  • Multiple Data Sources - Combine data from commits, PRs, issues, and more
  • Custom Visualizations - Choose charts and displays that best show your data
  • Alert Thresholds - Get notified when metrics exceed or fall below targets
  • Team Sharing - Share metrics with teammates or keep them private
When to Use Custom Metrics

Custom metrics are ideal when built-in metrics don't capture what you need to measure.

Good Use Cases

  • ✓ Team-specific KPIs
  • ✓ Process efficiency metrics
  • ✓ Quality ratios unique to your codebase
  • ✓ Sprint or milestone tracking
  • ✓ Compliance measurements
  • ✓ Custom weighting of existing metrics

When to Use Built-ins

  • • Standard velocity metrics
  • • Code quality scores
  • • Contributor activity
  • • PR merge times
  • • Commit frequency
  • • Issue resolution rates
Creating Your First Metric

Follow these steps to create a custom metric from scratch.

Step 1: Navigate to Custom Metrics

From the dashboard, go to Analytics → Custom Metrics → Create New Metric

Step 2: Define Basic Info

Name your metric, add a description, and choose a category (velocity, quality, collaboration, etc.)

Step 3: Select Metric Type

Choose: Count, Sum, Average, Ratio, or Custom Formula

Step 4: Build Your Formula

Use the formula builder to create calculations from available data sources

Step 5: Test & Save

Preview your metric with recent data to verify it works correctly, then save

Metric Formula Builder

The formula builder provides a visual interface for creating complex calculations without writing code.

Available Operators:

+ (add), - (subtract), * (multiply), / (divide), % (modulo), ^ (exponent)

Built-in Functions:

SUM(), AVG(), COUNT(), MIN(), MAX(), MEDIAN(), STDEV(), PERCENTILE()

Conditional Logic:

IF(), AND(), OR(), NOT() - Filter and transform data based on conditions

Date Functions:

TODAY(), DAYS_AGO(), WEEK_START(), MONTH_START(), DATE_DIFF()

Example Formula: Calculate PR review efficiency
(COUNT(pull_requests.merged) / COUNT(pull_requests.created)) * 100

Available Data Sources

Access data from multiple sources to build comprehensive metrics.

Commits Data

  • • commits.count
  • • commits.additions
  • • commits.deletions
  • • commits.files_changed
  • • commits.authors

Pull Requests

  • • pull_requests.created
  • • pull_requests.merged
  • • pull_requests.closed
  • • pull_requests.time_to_merge
  • • pull_requests.comments

Issues

  • • issues.created
  • • issues.closed
  • • issues.time_to_close
  • • issues.labels
  • • issues.assignees

Contributors

  • • contributors.count
  • • contributors.active
  • • contributors.new
  • • contributors.commits
  • • contributors.reviews
Metric Types & Visualization

Choose the right metric type and visualization for your data.

Count Metrics

Count occurrences of events (e.g., number of PRs, commits, or issues)

Best visualizations: Number card, Line chart, Bar chart

Sum Metrics

Add up values (e.g., total lines of code, total review comments)

Best visualizations: Number card, Area chart, Stacked bar

Average Metrics

Calculate averages (e.g., average PR size, mean time to merge)

Best visualizations: Gauge, Line chart, Distribution chart

Ratio Metrics

Compare two values (e.g., merged vs created PRs, bugs vs features)

Best visualizations: Percentage card, Pie chart, Progress bar

Setting Thresholds & Alerts

Configure alerts to be notified when metrics exceed targets or fall below minimums.

Alert Types:

  • Above Threshold - Alert when metric exceeds maximum value
  • Below Threshold - Alert when metric falls below minimum value
  • Outside Range - Alert when metric is outside acceptable range
  • Percentage Change - Alert on significant increase or decrease
  • Trend Detection - Alert on sustained upward or downward trends

Notification Channels:

Email
Slack
In-App
Webhook
Sharing Metrics with Team

Share custom metrics with team members or keep them private for personal tracking.

Private Metrics

Only visible to you. Perfect for personal KPIs and experimentation.

Team Shared

Visible to all team members. Great for tracking team goals and objectives.

Organization Wide

Visible across the entire organization. Ideal for company-wide KPIs.

Exporting Metric Data

Export custom metric data for reporting, analysis, or integration with other tools.

Export Options:

  • CSV - Time series data in spreadsheet format
  • JSON - Structured data for API integrations
  • PDF Charts - Visual reports with charts and annotations
  • Date Range Selection - Export specific time periods
  • Scheduled Exports - Automatic weekly or monthly exports
Use Cases & Examples

PR Efficiency Score

Formula: (merged_prs / created_prs) * (1 / avg_time_to_merge_days) * 100

Measures how quickly and successfully PRs are merged

Code Review Participation

Formula: reviews_given / (total_prs - own_prs) * 100

Percentage of team PRs reviewed by contributor

Sprint Velocity Trend

Formula: SUM(story_points_completed) / 14_days

Track story points completed per 2-week sprint