Class: Greenroom::Reporter
- Inherits:
-
Object
- Object
- Greenroom::Reporter
- Defined in:
- lib/greenroom/reporter.rb
Overview
The seam between the parts of this gem that produce events (the recorder, the experiment behavior) and wherever those events actually go. Kept as an abstract base plus two concrete subclasses here, and any real delivery implementation in its own file, so the core of the gem never has to load a delivery library it does not use.
Defined Under Namespace
Classes: Memory, NewRelic, Null
Constant Summary collapse
- MAX_ATTRIBUTE_LENGTH =
Greenroom's own bound, chosen rather than mirrored. Measured against the New Relic Ruby agent at version 10.7.1, that agent truncates an attribute name at 255 characters and an attribute value at 4095, so this cap is stricter than the value limit of the one delivery target written so far.
It is stricter on purpose. Every attribute this gem sends is meant to be short: a digest, a class name, a count, an identifier. A string long enough to reach this cap is a sign that something a host supplied -- an experiment name, a row identifier -- is carrying more than a label, and cutting it keeps one such value from bloating every event of a run.
255
Instance Method Summary collapse
Instance Method Details
#record(event_type, attributes) ⇒ Object
24 25 26 |
# File 'lib/greenroom/reporter.rb', line 24 def record(event_type, attributes) raise NotImplementedError, "#{self.class} must implement #record" end |