Class: Datadog::OpenFeature::Exposures::BatchBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/open_feature/exposures/batch_builder.rb

Overview

This class builds a batch of exposures and context to be sent to the Agent

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ BatchBuilder



8
9
10
# File 'lib/datadog/open_feature/exposures/batch_builder.rb', line 8

def initialize(settings)
  @context = build_context(settings)
end

Instance Method Details

#payload_for(events) ⇒ Object



12
13
14
15
16
17
# File 'lib/datadog/open_feature/exposures/batch_builder.rb', line 12

def payload_for(events)
  {
    context: @context,
    exposures: events
  }
end