Skip to content

Karim/metrics#103

Merged
johnno1962 merged 1 commit into
johnno1962:metricsfrom
karim-alweheshy:karim/metrics
Oct 5, 2025
Merged

Karim/metrics#103
johnno1962 merged 1 commit into
johnno1962:metricsfrom
karim-alweheshy:karim/metrics

Conversation

@karim-alweheshy
Copy link
Copy Markdown
Contributor

@karim-alweheshy karim-alweheshy commented Oct 3, 2025

Summary

Adds server-side enrichment for injection metrics by discovering Bazel targets and normalizing file paths before sending to clients.

Changes

  • Add bazelTarget field to InjectionMetricsTracker
  • Normalize sourcePath to workspace-relative before sending to client
  • Discover Bazel app target using BazelAQueryParser
  • Remove need for client-side enrichment logic

Benefits

Server sends fully enriched metrics:

  • sourcePath: workspace-relative path (e.g., Modules/Feature/File.swift)
  • bazelTarget: discovered app target (e.g., //Modules/Feature:FeatureSampleApp)

Client benefits:

  • No need for client-side path normalization
  • No need for client-side Bazel target discovery
  • Simpler client implementation
  • Consistent enrichment across all clients

Testing

  • Builds successfully with swift build
  • Server-side enrichment tested with Bazel workspace
  • Client receives normalized paths and Bazel targets

…ection metrics

- Add bazelTarget field to InjectionMetricsTracker
- Normalize sourcePath to workspace-relative before sending to client
- Discover Bazel app target using BazelAQueryParser
- Remove need for client-side enrichment logic

Server now sends fully enriched metrics with:
- sourcePath: workspace-relative path (e.g., 'Modules/Feature/File.swift')
- bazelTarget: discovered app target (e.g., '//Modules/Feature:FeatureSampleApp')
@karim-alweheshy karim-alweheshy changed the base branch from main to metrics October 3, 2025 16:25
@johnno1962 johnno1962 merged commit ff449e8 into johnno1962:metrics Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants