Numeric custom event properties use string operators in Sessions filters
Describe the issue
Numeric properties of custom analytics events are offered as text filters in Sessions. The property appears with the Aa icon and operators such as contains / starts with, instead of numeric comparisons.
The property is sent as a JSON number, not a numeric string. The event and its properties have already been ingested and are selectable; this report is about the selected property's type/operators, not missing-event ingestion or property visibility.
Steps to reproduce the issue
- With analytics enabled on a running tracker, send a custom event, for example:
tracker.analytics.events.sendEvent('numeric_property_repro', { elapsed_seconds: 123, }); - Wait for ingestion. In Data Management, make sure the event/property is visible. If necessary, save the property's visibility/settings so it is available in the event-property selector.
- Open Sessions, add the custom event, and add
elapsed_secondsas a condition on that event. - Open the operator selector. It offers string operators rather than numeric comparisons.
Expected behavior
A property ingested with a numeric type should use the existing numeric filter operators (>, >=, <, <=, etc.), rather than requiring a frontend workaround or string matching.
Screenshots
Omitted to avoid exposing private session/user data. The visible symptom is the Aa property icon with is, is any, is not, contains, does not contain, starts with, ends with, and regex operators.
OpenReplay Environment
- Frontend stack: React / TypeScript web application.
- OpenReplay version: UI behavior observed on self-hosted 1.25. The missing-
dataTypecontract was also reproduced in isolation using the unmodified latest release v1.27.0 Python handler and its real type-normalization functions. CurrentdevGo implementation has the same omission and a failing regression test. A full v1.27.0 deployment/browser reproduction has not been run. - Tracker version:
@openreplay/tracker17.2.6. - Plugins used: no plugin is needed for this example; built-in analytics events API.
- Cloud provider: not relevant to the isolated handler reproduction; no deployment details included.
- System specs: isolated tests on macOS arm64; Go tests use 1.26.6. No live ClickHouse instance is required by the regression test.
Additional context
The event-properties catalog returns normalized possibleTypes but omits dataType for non-predefined properties:
- Released Python implementation: v1.27.0 get_event_properties.
- Current Go implementation: buildEventProperties.
- The frontend processFilters selects
stringwhendataTypeis absent;possibleTypesdoes not select the filter type.
An isolated call of the actual v1.27.0 Python handler with a synthetic ClickHouse row containing possible_types = ["UInt64"] produces, in relevant part:
{
"name": "elapsed_seconds",
"possibleTypes": ["int"],
"isPredefined": false,
"possibleValues": []
}There is no dataType. The same omission reproduces with Int64 and Float64. This is handler-output evidence with a stubbed DB boundary, not a captured production network response.
Possible fix
Make the event-specific catalog use the same inference convention already implemented by the all-properties catalog:
- Keep the predefined property's declared type and possible values unchanged.
- For other properties, return the first normalized observed type as
dataType. - Fall back to
stringonly when no observed types are available.
I am preparing a small PR against dev for the maintained Go API with regression tests for integer/float/bool/string properties, empty types, normalization, and predefined overrides. The released Python API would need the analogous backport if maintained separately. This proposal does not change mixed-type precedence, SQL, visibility, SDK serialization, or database schemas.
I searched existing issues/PRs and did not find the same catalog-type omission; #4829 is about refreshing sessions after adding a custom event, not property operators.
AI assistance disclosure: this report and proposed patch were prepared with OpenAI Codex. The UI symptom was reported by a human user; source analysis and automated regression checks are distinguished above from deployment-level validation.
Source: openreplay/openreplay