Class: Datadog::Core::Telemetry::Event::Base Private

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/core/telemetry/event/base.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Base class for all Telemetry V2 events.

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object Also known as: eql?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Override equality to allow for deduplication The basic implementation is to check if the other object is an instance of the same class. This works for events that have no attributes. For events with attributes, you should override this method to compare the attributes.



25
26
27
# File 'lib/datadog/core/telemetry/event/base.rb', line 25

def ==(other)
  other.is_a?(self.class)
end

#hashObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

See Also:



33
34
35
# File 'lib/datadog/core/telemetry/event/base.rb', line 33

def hash
  self.class.hash
end

#payloadObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The JSON payload for the event.



17
18
19
# File 'lib/datadog/core/telemetry/event/base.rb', line 17

def payload
  {}
end

#typeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The type of the event. It must be one of the stings defined in the Telemetry V2 specification for event names.

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/datadog/core/telemetry/event/base.rb', line 12

def type
  raise NotImplementedError, 'Must be implemented by subclass'
end