Skip to content

feat(metric): add request attributes and premium geo fields to Metric… - #36

Merged
ArnabChatterjee20k merged 2 commits into
mainfrom
feat-new-usage-stats
Sep 3, 2026
Merged

feat(metric): add request attributes and premium geo fields to Metric…#36
ArnabChatterjee20k merged 2 commits into
mainfrom
feat-new-usage-stats

Conversation

@ArnabChatterjee20k

Copy link
Copy Markdown
Contributor

… class

@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown

Greptile Summary

The PR extends event metrics with request attributes and additional premium geolocation fields, with matching event-schema definitions and contract-test expectations.

  • Adds protocol, request-header, cookie, and query-key dimensions.
  • Adds postal code, coordinates, time zone, and weather-code dimensions.
  • Updates the event-column contract test to include all new fields.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/Usage/Metric.php Adds ten event dimensions and matching string schema columns while preserving alignment between the event-column contract and storage schema.
tests/Usage/MetricTest.php Updates the hard-coded event-column expectation to exactly match the expanded constant, resolving the previously reported test failure.

Reviews (2): Last reviewed commit: "feat(metric): increase cookie column siz..." | Re-trigger Greptile

Comment thread src/Usage/Metric.php
Comment on lines +58 to 60
'protocol', 'accept', 'acceptLanguage', 'cookie', 'queryKeys',
// premium geo
'city', 'continentCode', 'subdivisions',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Event-column contract test breaks

When the test suite runs, testEventColumnsConstant compares Metric::EVENT_COLUMNS with a hard-coded list that omits all ten newly added fields, causing the exact assertSame assertion and CI to fail.

Knowledge Base Used: Usage domain model

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/Usage/Metric.php
Line: 58-60

Comment:
**Event-column contract test breaks**

When the test suite runs, `testEventColumnsConstant` compares `Metric::EVENT_COLUMNS` with a hard-coded list that omits all ten newly added fields, causing the exact `assertSame` assertion and CI to fail.

**Knowledge Base Used:** [Usage domain model](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/utopia-php/usage/-/docs/usage-domain-model.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Codex

@ArnabChatterjee20k
ArnabChatterjee20k merged commit fde5dd8 into main Sep 3, 2026
4 checks passed
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