Module: Braintrust::Internal::Origin
- Defined in:
- lib/braintrust/internal/origin.rb
Overview
Origin provides serialization for source object pointers in Braintrust. Used internally to link spans back to their source records (e.g., dataset rows).
Class Method Summary collapse
-
.to_json(object_type:, object_id:, id:, xact_id:, created:) ⇒ String
Serialize an origin pointer to JSON.
Class Method Details
.to_json(object_type:, object_id:, id:, xact_id:, created:) ⇒ String
Serialize an origin pointer to JSON
17 18 19 20 21 22 23 24 25 |
# File 'lib/braintrust/internal/origin.rb', line 17 def self.to_json(object_type:, object_id:, id:, xact_id:, created:) JSON.dump({ object_type: object_type, object_id: object_id, id: id, _xact_id: xact_id, created: created }) end |