Skip to main content
All Guides
Metrics

Your Engineering Metrics Are Lying to You

Learn how engineering analytics tools ensure data accuracy through bot filtering, file exclusions, and reliable sync mechanisms.

10 min readUpdated January 15, 2025By CodePulse Team

"Garbage in, garbage out." If your engineering metrics include bot commits, configuration file changes, and inactive contributors, you're not measuring what matters. You're measuring noise. And when stakeholders discover that 40% of your "productivity gains" came from Dependabot, your credibility evaporates.

This guide explains how modern engineering analytics platforms filter noise, handle edge cases, and ensure that the metrics you report actually reflect human engineering work. If you've ever been skeptical about metric accuracy, this is for you.

Why Data Quality Matters for Engineering Metrics

The Trust Problem

Engineering metrics are only as good as the data they're built on. When developers or executives discover that metrics include automated commits, configuration changes, or test data, trust erodes immediately.

Common data quality issues that undermine metrics:

  • Bot activity inflating counts: Dependabot, Renovate, and GitHub Actions can generate hundreds of PRs per month
  • Configuration noise: Changes to package.json, requirements.txt, or YAML files dominating "lines changed" metrics
  • Inactive contributor skew: Developers who left months ago still appearing in "team size" calculations
  • Documentation treated as code: Markdown changes weighted equally with feature development
  • Incomplete sync data: Gaps in historical data that make trends misleading

The Impact of Poor Data Quality

When metrics include noise, the consequences are real:

  • Misallocated resources: You think you need more capacity, but half your "work" is automated
  • False improvements: Metrics show productivity gains that are actually just bot activity increasing
  • Unfair comparisons: Team A looks more productive because they use more automation, not because they ship more features
  • Credibility loss: Once stakeholders catch data quality issues, they stop trusting all your metrics

The solution isn't to abandon metrics—it's to implement rigorous data quality practices from the start.

How CodePulse Filters Bot Activity

Automatic Bot Detection

Not all GitHub activity represents human engineering work. Bots handle dependency updates, run automated workflows, and generate test data. CodePulse filters these automatically using multiple detection methods:

Username pattern matching:

  • Any GitHub username containing [bot] suffix (GitHub's standard)
  • Known automation accounts: dependabot, github-actions,renovate, greenkeeper

What gets filtered:

  • Bot-authored PRs excluded from velocity and cycle time metrics
  • Bot commits excluded from activity and productivity calculations
  • Bot reviews excluded from review coverage and reviewer load metrics
  • Bots not counted in active contributor or team size calculations

User Control: The "Exclude Bots" Toggle

While CodePulse defaults to excluding bots (because that's what most teams want), you have full control. Every major view includes an "Exclude Bots" toggle:

Default behavior: Bots excluded. This prevents the common mistake of reporting "200 PRs merged" when 80 were Dependabot updates.

Custom Bot Patterns

Organizations often have custom automation accounts that don't match standard patterns. Future releases will support custom bot lists so you can define your own filtering rules.

Detect code hotspots and knowledge silos with CodePulse

File Type Exclusions: Measuring Real Code

Why File Type Matters

Not all file changes represent equal engineering effort. A 500-line change to package.json (adding dependencies) is fundamentally different from a 500-line feature implementation. Yet naive metrics treat them identically.

CodePulse automatically categorizes and filters non-code files to ensure metrics reflect actual engineering work:

Excluded File Types

Documentation files:

  • *.md - Markdown documentation
  • *.rst, *.txt - Other documentation formats

Dependency manifests:

  • package.json, package-lock.json - Node.js dependencies
  • requirements.txt, Pipfile.lock - Python dependencies
  • Gemfile.lock, go.mod - Ruby and Go dependencies

Configuration files:

  • *.yml, *.yaml - CI/CD and config files
  • .gitignore, .dockerignore - Repository metadata

Data and generated files:

  • *.csv, *.json (when used as data, not config)
  • *.lock - Auto-generated lockfiles

Impact on Metrics

File type exclusions ensure these metrics accurately reflect code work:

  • Average PR Size: Excludes lockfile updates that would inflate line counts by thousands
  • Lines of Code per Day: Focuses on actual code contributions, not documentation updates
  • Code Churn: Identifies real code volatility, not YAML tweaks. See Code Churn Guide

When to Include All Files

Some teams want to measure documentation or infrastructure work. CodePulse provides filters that let you toggle inclusion/exclusion based on what you're analyzing:

  • Analyzing DevOps team productivity? Include YAML configuration work
  • Measuring documentation improvements? Toggle to include Markdown changes
  • Comparing feature velocity? Exclude everything but source code

Handling Inactive Contributors

The Inactive Contributor Problem

Developer rosters constantly change. People leave, move to other teams, or go on extended leave. But their GitHub accounts remain in your organization, skewing per-capita metrics.

If your team has 20 members but only 12 are actively contributing, reporting "productivity per engineer" using 20 as the denominator understates actual performance by 40%.

CodePulse's Inactivity Detection

CodePulse automatically identifies inactive developers using a 30-day activity threshold:

30-Day Activity Detection

Inactive if no activity in last 30 days
  • No commits authored
  • No PRs created
  • No PR reviews given
  • No PR comments
Active contributors are included in
  • Team size calculations
  • Per-capita productivity metrics
  • Reviewer load distribution
  • Shared contributor counts

Why 30 Days?

The 30-day threshold balances accuracy with flexibility:

  • Captures vacation: Developers taking 2-3 weeks off remain "active" in metrics
  • Excludes departures: Developers who left are removed from team counts after a month
  • Reflects sprint cycles: Aligns with typical 2-week sprint windows plus buffer

This means "active contributors" in CodePulse represents people who actually participated in engineering work recently, not everyone with a GitHub account.

How to See This in CodePulse

CodePulse automatically applies these data quality filters:

  • Dashboard shows active contributors (excludes inactive + bots by default)
  • Developers page lets you toggle "Exclude Bots" to compare filtered vs unfiltered data
  • Metrics tooltips explain what's included/excluded in each calculation
  • Export raw data with filter settings documented for audit trails

Working Days and Locale Configuration

The Global Team Challenge

Most engineering metrics implicitly assume a Monday-Friday workweek. But not all teams operate on this schedule:

  • Middle Eastern teams often work Sunday-Thursday
  • Some teams include Saturday as a working day
  • National holidays vary by country
  • Organizations have company-specific holiday calendars

Using a US-centric calendar to measure a globally distributed team produces misleading velocity metrics.

Working Days Configuration

CodePulse allows organization-level configuration of working days:

Organization Settings:
{
  "working_days": {
    "use_working_days": true,
    "working_days": [0, 1, 2, 3, 4],  // 0=Monday, 6=Sunday
    "holidays": [
      "2025-12-25",
      "2025-01-01",
      "2025-07-04"
    ]
  }
}

Metrics Affected by Working Days

When working days configuration is enabled, these metrics adjust calculations:

  • Lines of Code per Day: Divides by working days only, not calendar days
  • Commits per Day: Normalized to working days for fair comparison
  • Deployment Frequency: Reports deployments per working day
  • Cycle Time: Can optionally exclude weekends/holidays from elapsed time calculations

This ensures that a team working 5 days/week isn't compared unfavorably to metrics that assume 7 days/week activity.

For more on building accurate dashboards, see Engineering Metrics Dashboard Guide.

Sync Reliability: No Data Gaps

The Incremental Sync Challenge

Many analytics tools fetch data incrementally—checking for new activity since the last sync. But what happens when a sync job crashes halfway through? Or when the server restarts during data collection?

Naive implementations leave permanent gaps in historical data. You might miss critical PRs, causing metrics to show a productivity dip that never actually happened.

CodePulse's Watermark-Based Sync

CodePulse uses a watermark-based sync system that guarantees data completeness even when failures occur:

How Watermarks Work

1. Initial Sync (no watermark)
  • Fetches last 6 months of data
  • Processes oldest to newest (ascending order)
  • Checkpoints watermark every 10 PRs
2. Checkpoint on Crash
  • Job crashes after processing 50 PRs
  • Watermark saved at PR #40 (last checkpoint)
  • Next sync resumes from PR #40, not #50
3. Incremental Sync
  • Uses watermark as "start from" pointer
  • Only fetches data updated since watermark
  • Progressive checkpoints prevent data loss

Why This Matters

Watermark-based sync ensures your metrics reflect reality:

  • No missing data: Even if syncs fail, resumed syncs fill gaps
  • No duplicate data: Watermarks prevent processing the same PR twice
  • Verifiable history: You can audit sync logs to confirm complete data coverage
  • Accurate trends: Missing data points won't create false productivity drops

Sync Monitoring

CodePulse provides visibility into sync health:

  • Last sync timestamp per repository
  • Current watermark values (last PR processed, last commit processed)
  • Sync error logs when failures occur
  • Automatic retry with exponential backoff on GitHub rate limits

This transparency lets you verify that metrics are built on complete, accurate data. For more on avoiding metric pitfalls, see Measure Team Performance Without Micromanaging.

Best Practices for Data Quality

1. Audit Your Filters Regularly

Bot detection and file exclusions should evolve with your organization:

  • Review "Exclude Bots" toggle quarterly—are new automation accounts being caught?
  • Check if legitimate contributors are mistakenly filtered
  • Adjust file exclusions if your codebase structure changes

2. Document Your Methodology

When presenting metrics to stakeholders, be transparent about filtering:

Example Metric Documentation:

"PRs Merged: 247 (last 30 days)"

Methodology:
- Excludes bot-authored PRs (dependabot, renovate, github-actions)
- Counts only PRs with status = merged
- Includes all human contributors with activity in last 30 days
- Time range: 2025-11-05 to 2025-12-05

See full methodology: /docs/metrics-definitions

3. Validate with Spot Checks

Periodically verify metrics match reality:

  • Pick a week and manually count PRs—does it match the dashboard?
  • Check if a known inactive developer appears in team size counts
  • Verify bot PRs aren't inflating velocity metrics

4. Compare Filtered vs Unfiltered

Use the "Exclude Bots" toggle to understand the impact of filtering:

Example Comparison

With Bots Included
  • PRs merged: 342
  • Cycle time: 18 hours
  • Active contributors: 28
With Bots Excluded
  • PRs merged: 198 (42% reduction)
  • Cycle time: 26 hours
  • Active contributors: 24

Insight: Bot PRs have much faster cycle times (instant merge), artificially lowering the team average by 31%.

5. Set Alerts for Data Quality Issues

Configure alerts to catch data problems early:

  • Alert if sync hasn't completed in 24 hours (data freshness issue)
  • Alert if bot activity suddenly spikes (new automation to categorize)
  • Alert if active contributor count drops >20% (potential filtering bug)
Detect code hotspots and knowledge silos with CodePulse

Conclusion: Trust Through Transparency

Data quality isn't a one-time setup task—it's an ongoing commitment. The best engineering analytics platforms make their filtering logic transparent, give users control over what's included, and provide audit trails to verify accuracy.

When you can confidently answer "How do you know this metric is accurate?" with specific filtering rules and validation methods, you've built the foundation for metrics-driven decision making.

Poor data quality is often cited as the reason teams abandon metrics entirely. Don't let noise undermine your visibility. Implement rigorous filtering from day one, document your methodology, and validate regularly.

For more on building trust with engineering metrics, see Measure Team Performance Without Micromanaging and Monorepo & Multi-Repo Metrics.

See these insights for your team

CodePulse connects to your GitHub and shows you actionable engineering metrics in minutes. No complex setup required.

Free tier available. No credit card required.