Skip to content

RUMM-36 Base Logger implementation#1

Merged
xgouchet merged 4 commits into
masterfrom
xgouchet/RUMM-36_logger
Nov 12, 2019
Merged

RUMM-36 Base Logger implementation#1
xgouchet merged 4 commits into
masterfrom
xgouchet/RUMM-36_logger

Conversation

@xgouchet

@xgouchet xgouchet commented Nov 6, 2019

Copy link
Copy Markdown
Contributor

Lots of stuff is still in TODO and will follow up in next PRs

@xgouchet
xgouchet force-pushed the xgouchet/RUMM-36_logger branch from 1260d63 to 1905b2c Compare November 12, 2019 08:48
@xgouchet
xgouchet merged commit a14f2bc into master Nov 12, 2019
@xgouchet
xgouchet deleted the xgouchet/RUMM-36_logger branch November 21, 2019 12:41
@xgouchet xgouchet added this to the 1.0.0 milestone May 11, 2021
alai97 added a commit that referenced this pull request Jan 4, 2022
Co-authored-by: cswatt <[email protected]>
typotter added a commit that referenced this pull request Jan 22, 2026
Implements the core aggregation logic for evaluation logging (EVALLOG).
Aggregates flag evaluations by key before flushing to reduce network overhead.

Key components:
- EvaluationEventsProcessor: Aggregates evaluations with time/size-based flushing
  - Time-based: Configurable interval (default 10s, range 1-60s)
  - Size-based: Auto-flush at 1000 unique aggregations
  - Shutdown: Final flush on processor.stop()

- AggregationKey: Composite key for grouping evaluations
  - Groups by: flag, variant, allocation, targeting key, error code
  - EVALLOG.8: Omits variant/allocation for DEFAULT/ERROR reasons

- AggregationStats: Tracks aggregated statistics per key
  - Count, first/last timestamps, last error message
  - Thread-safe with @volatile fields and synchronized blocks

- EvaluationEventWriter: Interface for persisting FlagEvaluation events
  - Abstraction allows testing without storage implementation

Test infrastructure:
- FlagEvaluationAssert: Custom assertions for validation
- FlagEvaluationForgeryFactory: Test data generator
- EvaluationContextForgeryFactory: Context data generator

Uses BatchedFlagEvaluations.FlagEvaluation from PR #1 schema.
No runtime integration - isolated business logic only.

EVALLOG compliance: 2, 3, 4, 5, 8, 10, 11, 13
typotter added a commit that referenced this pull request Jan 22, 2026
Implements persistence and network transport for evaluation events.

Storage layer (EvaluationEventRecordWriter):
- Implements EvaluationEventWriter interface from PR #2
- Serializes FlagEvaluation events to JSON
- Persists to SDK Core storage as RawBatchEvent
- Thread-safe with synchronized writes

Network layer (EvaluationsRequestFactory):
- Creates HTTP requests to /api/v2/flagevaluations endpoint
- Builds BatchedFlagEvaluations payload per EVALLOG.1 specification
- Wraps individual FlagEvaluation events with top-level context:
  - Service metadata (service, version, env)
  - Device info (name, type, brand, model)
  - OS info (name, version)
  - RUM context (application.id, view.url)
- Handles malformed events gracefully (skip and log)
- Standard EVP headers (API key, origin, origin version, request ID)

EVALLOG.1 compliance:
- Endpoint: /api/v2/flagevaluations
- Content-Type: application/json
- Payload: {"context": {...}, "flagEvaluations": [...]}

Depends on BatchedFlagEvaluations model from PR #1.
Uses EvaluationEventWriter interface from PR #2.
typotter added a commit that referenced this pull request Jan 22, 2026
Implements persistence and network transport for evaluation events.

Storage layer (EvaluationEventRecordWriter):
- Implements EvaluationEventWriter interface from PR #2
- Serializes FlagEvaluation events to JSON
- Persists to SDK Core storage as RawBatchEvent
- Thread-safe with synchronized writes

Network layer (EvaluationsRequestFactory):
- Creates HTTP requests to /api/v2/flagevaluations endpoint
- Builds BatchedFlagEvaluations payload per EVALLOG.1 specification
- Wraps individual FlagEvaluation events with top-level context:
  - Service metadata (service, version, env)
  - Device info (name, type, brand, model)
  - OS info (name, version)
  - RUM context (application.id, view.url)
- Handles malformed events gracefully (skip and log)
- Standard EVP headers (API key, origin, origin version, request ID)

EVALLOG.1 compliance:
- Endpoint: /api/v2/flagevaluations
- Content-Type: application/json
- Payload: {"context": {...}, "flagEvaluations": [...]}

Depends on BatchedFlagEvaluations model from PR #1.
Uses EvaluationEventWriter interface from PR #2.
typotter added a commit that referenced this pull request Jan 27, 2026
Implements the core aggregation logic for evaluation logging (EVALLOG).
Aggregates flag evaluations by key before flushing to reduce network overhead.

Key components:
- EvaluationEventsProcessor: Aggregates evaluations with time/size-based flushing
  - Time-based: Configurable interval (default 10s, range 1-60s)
  - Size-based: Auto-flush at 1000 unique aggregations
  - Shutdown: Final flush on processor.stop()

- AggregationKey: Composite key for grouping evaluations
  - Groups by: flag, variant, allocation, targeting key, error code
  - EVALLOG.8: Omits variant/allocation for DEFAULT/ERROR reasons

- AggregationStats: Tracks aggregated statistics per key
  - Count, first/last timestamps, last error message
  - Thread-safe with @volatile fields and synchronized blocks

- EvaluationEventWriter: Interface for persisting FlagEvaluation events
  - Abstraction allows testing without storage implementation

Test infrastructure:
- FlagEvaluationAssert: Custom assertions for validation
- FlagEvaluationForgeryFactory: Test data generator
- EvaluationContextForgeryFactory: Context data generator

Uses BatchedFlagEvaluations.FlagEvaluation from PR #1 schema.
No runtime integration - isolated business logic only.

EVALLOG compliance: 2, 3, 4, 5, 8, 10, 11, 13
typotter added a commit that referenced this pull request Jan 28, 2026
Implements the core aggregation logic for evaluation logging (EVALLOG).
Aggregates flag evaluations by key before flushing to reduce network overhead.

Key components:
- EvaluationEventsProcessor: Aggregates evaluations with time/size-based flushing
  - Time-based: Configurable interval (default 10s, range 1-60s)
  - Size-based: Auto-flush at 1000 unique aggregations
  - Shutdown: Final flush on processor.stop()

- AggregationKey: Composite key for grouping evaluations
  - Groups by: flag, variant, allocation, targeting key, error code
  - EVALLOG.8: Omits variant/allocation for DEFAULT/ERROR reasons

- AggregationStats: Tracks aggregated statistics per key
  - Count, first/last timestamps, last error message
  - Thread-safe with @volatile fields and synchronized blocks

- EvaluationEventWriter: Interface for persisting FlagEvaluation events
  - Abstraction allows testing without storage implementation

Test infrastructure:
- FlagEvaluationAssert: Custom assertions for validation
- FlagEvaluationForgeryFactory: Test data generator
- EvaluationContextForgeryFactory: Context data generator

Uses BatchedFlagEvaluations.FlagEvaluation from PR #1 schema.
No runtime integration - isolated business logic only.

EVALLOG compliance: 2, 3, 4, 5, 8, 10, 11, 13
typotter added a commit that referenced this pull request Jan 28, 2026
Implements the core aggregation logic for evaluation logging (EVALLOG).
Aggregates flag evaluations by key before flushing to reduce network overhead.

Key components:
- EvaluationEventsProcessor: Aggregates evaluations with time/size-based flushing
  - Time-based: Configurable interval (default 10s, range 1-60s)
  - Size-based: Auto-flush at 1000 unique aggregations
  - Shutdown: Final flush on processor.stop()

- AggregationKey: Composite key for grouping evaluations
  - Groups by: flag, variant, allocation, targeting key, error code
  - EVALLOG.8: Omits variant/allocation for DEFAULT/ERROR reasons

- AggregationStats: Tracks aggregated statistics per key
  - Count, first/last timestamps, last error message
  - Thread-safe with @volatile fields and synchronized blocks

- EvaluationEventWriter: Interface for persisting FlagEvaluation events
  - Abstraction allows testing without storage implementation

Test infrastructure:
- FlagEvaluationAssert: Custom assertions for validation
- FlagEvaluationForgeryFactory: Test data generator
- EvaluationContextForgeryFactory: Context data generator

Uses BatchedFlagEvaluations.FlagEvaluation from PR #1 schema.
No runtime integration - isolated business logic only.

EVALLOG compliance: 2, 3, 4, 5, 8, 10, 11, 13
typotter added a commit that referenced this pull request Jan 28, 2026
Implements the core aggregation logic for evaluation logging (EVALLOG).
Aggregates flag evaluations by key before flushing to reduce network overhead.

Key components:
- EvaluationEventsProcessor: Aggregates evaluations with time/size-based flushing
  - Time-based: Configurable interval (default 10s, range 1-60s)
  - Size-based: Auto-flush at 1000 unique aggregations
  - Shutdown: Final flush on processor.stop()

- AggregationKey: Composite key for grouping evaluations
  - Groups by: flag, variant, allocation, targeting key, error code
  - EVALLOG.8: Omits variant/allocation for DEFAULT/ERROR reasons

- AggregationStats: Tracks aggregated statistics per key
  - Count, first/last timestamps, last error message
  - Thread-safe with @volatile fields and synchronized blocks

- EvaluationEventWriter: Interface for persisting FlagEvaluation events
  - Abstraction allows testing without storage implementation

Test infrastructure:
- FlagEvaluationAssert: Custom assertions for validation
- FlagEvaluationForgeryFactory: Test data generator
- EvaluationContextForgeryFactory: Context data generator

Uses BatchedFlagEvaluations.FlagEvaluation from PR #1 schema.
No runtime integration - isolated business logic only.

EVALLOG compliance: 2, 3, 4, 5, 8, 10, 11, 13
typotter added a commit that referenced this pull request Jan 28, 2026
Implements the core aggregation logic for evaluation logging (EVALLOG).
Aggregates flag evaluations by key before flushing to reduce network overhead.

Key components:
- EvaluationEventsProcessor: Aggregates evaluations with time/size-based flushing
  - Time-based: Configurable interval (default 10s, range 1-60s)
  - Size-based: Auto-flush at 1000 unique aggregations
  - Shutdown: Final flush on processor.stop()

- AggregationKey: Composite key for grouping evaluations
  - Groups by: flag, variant, allocation, targeting key, error code
  - EVALLOG.8: Omits variant/allocation for DEFAULT/ERROR reasons

- AggregationStats: Tracks aggregated statistics per key
  - Count, first/last timestamps, last error message
  - Thread-safe with @volatile fields and synchronized blocks

- EvaluationEventWriter: Interface for persisting FlagEvaluation events
  - Abstraction allows testing without storage implementation

Test infrastructure:
- FlagEvaluationAssert: Custom assertions for validation
- FlagEvaluationForgeryFactory: Test data generator
- EvaluationContextForgeryFactory: Context data generator

Uses BatchedFlagEvaluations.FlagEvaluation from PR #1 schema.
No runtime integration - isolated business logic only.

EVALLOG compliance: 2, 3, 4, 5, 8, 10, 11, 13
typotter added a commit that referenced this pull request Jan 28, 2026
Implements the core aggregation logic for evaluation logging (EVALLOG).
Aggregates flag evaluations by key before flushing to reduce network overhead.

Key components:
- EvaluationEventsProcessor: Aggregates evaluations with time/size-based flushing
  - Time-based: Configurable interval (default 10s, range 1-60s)
  - Size-based: Auto-flush at 1000 unique aggregations
  - Shutdown: Final flush on processor.stop()

- AggregationKey: Composite key for grouping evaluations
  - Groups by: flag, variant, allocation, targeting key, error code
  - EVALLOG.8: Omits variant/allocation for DEFAULT/ERROR reasons

- AggregationStats: Tracks aggregated statistics per key
  - Count, first/last timestamps, last error message
  - Thread-safe with @volatile fields and synchronized blocks

- EvaluationEventWriter: Interface for persisting FlagEvaluation events
  - Abstraction allows testing without storage implementation

Test infrastructure:
- FlagEvaluationAssert: Custom assertions for validation
- FlagEvaluationForgeryFactory: Test data generator
- EvaluationContextForgeryFactory: Context data generator

Uses BatchedFlagEvaluations.FlagEvaluation from PR #1 schema.
No runtime integration - isolated business logic only.

EVALLOG compliance: 2, 3, 4, 5, 8, 10, 11, 13
typotter added a commit that referenced this pull request Jan 30, 2026
Implements the core aggregation logic for evaluation logging (EVALLOG).
Aggregates flag evaluations by key before flushing to reduce network overhead.

Key components:
- EvaluationEventsProcessor: Aggregates evaluations with time/size-based flushing
  - Time-based: Configurable interval (default 10s, range 1-60s)
  - Size-based: Auto-flush at 1000 unique aggregations
  - Shutdown: Final flush on processor.stop()

- AggregationKey: Composite key for grouping evaluations
  - Groups by: flag, variant, allocation, targeting key, error code
  - EVALLOG.8: Omits variant/allocation for DEFAULT/ERROR reasons

- AggregationStats: Tracks aggregated statistics per key
  - Count, first/last timestamps, last error message
  - Thread-safe with @volatile fields and synchronized blocks

- EvaluationEventWriter: Interface for persisting FlagEvaluation events
  - Abstraction allows testing without storage implementation

Test infrastructure:
- FlagEvaluationAssert: Custom assertions for validation
- FlagEvaluationForgeryFactory: Test data generator
- EvaluationContextForgeryFactory: Context data generator

Uses BatchedFlagEvaluations.FlagEvaluation from PR #1 schema.
No runtime integration - isolated business logic only.

EVALLOG compliance: 2, 3, 4, 5, 8, 10, 11, 13
typotter added a commit that referenced this pull request Feb 2, 2026
Implements the core aggregation logic for evaluation logging (EVALLOG).
Aggregates flag evaluations by key before flushing to reduce network overhead.

Key components:
- EvaluationEventsProcessor: Aggregates evaluations with time/size-based flushing
  - Time-based: Configurable interval (default 10s, range 1-60s)
  - Size-based: Auto-flush at 1000 unique aggregations
  - Shutdown: Final flush on processor.stop()

- AggregationKey: Composite key for grouping evaluations
  - Groups by: flag, variant, allocation, targeting key, error code
  - EVALLOG.8: Omits variant/allocation for DEFAULT/ERROR reasons

- AggregationStats: Tracks aggregated statistics per key
  - Count, first/last timestamps, last error message
  - Thread-safe with @volatile fields and synchronized blocks

- EvaluationEventWriter: Interface for persisting FlagEvaluation events
  - Abstraction allows testing without storage implementation

Test infrastructure:
- FlagEvaluationAssert: Custom assertions for validation
- FlagEvaluationForgeryFactory: Test data generator
- EvaluationContextForgeryFactory: Context data generator

Uses BatchedFlagEvaluations.FlagEvaluation from PR #1 schema.
No runtime integration - isolated business logic only.

EVALLOG compliance: 2, 3, 4, 5, 8, 10, 11, 13
gh-worker-dd-mergequeue-cf854d Bot pushed a commit that referenced this pull request Feb 13, 2026
Implements the core aggregation logic for evaluation logging (EVALLOG).
Aggregates flag evaluations by key before flushing to reduce network overhead.

Key components:
- EvaluationEventsProcessor: Aggregates evaluations with time/size-based flushing
  - Time-based: Configurable interval (default 10s, range 1-60s)
  - Size-based: Auto-flush at 1000 unique aggregations
  - Shutdown: Final flush on processor.stop()

- AggregationKey: Composite key for grouping evaluations
  - Groups by: flag, variant, allocation, targeting key, error code
  - EVALLOG.8: Omits variant/allocation for DEFAULT/ERROR reasons

- AggregationStats: Tracks aggregated statistics per key
  - Count, first/last timestamps, last error message
  - Thread-safe with @volatile fields and synchronized blocks

- EvaluationEventWriter: Interface for persisting FlagEvaluation events
  - Abstraction allows testing without storage implementation

Test infrastructure:
- FlagEvaluationAssert: Custom assertions for validation
- FlagEvaluationForgeryFactory: Test data generator
- EvaluationContextForgeryFactory: Context data generator

Uses BatchedFlagEvaluations.FlagEvaluation from PR #1 schema.
No runtime integration - isolated business logic only.

EVALLOG compliance: 2, 3, 4, 5, 8, 10, 11, 13
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.

1 participant