Class: Datadog::CI::TestVisibility::Transport

Inherits:
Datadog::CI::Transport::EventPlatformTransport show all
Defined in:
lib/datadog/ci/test_visibility/transport.rb

Constant Summary

Constants inherited from Datadog::CI::Transport::EventPlatformTransport

Datadog::CI::Transport::EventPlatformTransport::DEFAULT_MAX_PAYLOAD_SIZE

Instance Attribute Summary collapse

Attributes inherited from Datadog::CI::Transport::EventPlatformTransport

#api, #max_payload_size

Instance Method Summary collapse

Methods inherited from Datadog::CI::Transport::EventPlatformTransport

#send_events

Constructor Details

#initialize(api:, dd_env:, serializers_factory: Datadog::CI::TestVisibility::Serializers::Factories::TestLevel, max_payload_size: DEFAULT_MAX_PAYLOAD_SIZE) ⇒ Transport

Returns a new instance of Transport.



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/datadog/ci/test_visibility/transport.rb', line 18

def initialize(
  api:,
  dd_env:,
  serializers_factory: Datadog::CI::TestVisibility::Serializers::Factories::TestLevel,
  max_payload_size: DEFAULT_MAX_PAYLOAD_SIZE
)
  super(api: api, max_payload_size: max_payload_size)

  @serializers_factory = serializers_factory
  @dd_env = dd_env
end

Instance Attribute Details

#dd_envObject (readonly)

Returns the value of attribute dd_env.



16
17
18
# File 'lib/datadog/ci/test_visibility/transport.rb', line 16

def dd_env
  @dd_env
end

#serializers_factoryObject (readonly)

Returns the value of attribute serializers_factory.



16
17
18
# File 'lib/datadog/ci/test_visibility/transport.rb', line 16

def serializers_factory
  @serializers_factory
end

Instance Method Details

#send_traces(traces) ⇒ Object

this method is needed for compatibility with Datadog::Tracing::Writer that uses this Transport



31
32
33
# File 'lib/datadog/ci/test_visibility/transport.rb', line 31

def send_traces(traces)
  send_events(traces)
end