DataDogLogClient

REST client for DataDog logs.

Implements: RestClient

Description

The DataDogLogClient class allows you to create a REST client for DataDog logs.

Constructors

Creates a new instance of this class.

NewDataDogLogClient(config *ConfigParams) *DataDogLogClient

Methods

Configure

Configures a component by passing its configuration parameters.

(c *DataDogLogClient) Configure(ctx context.Context, config *ConfigParams)

  • ctx: context.Context - operation context.
  • config: *ConfigParams - configuration parameters to be set.

Open

Opens the component.

(c *DataDogLogClient) Open(ctx context.Context, correlationId string) error

  • ctx: context.Context - operation context.
  • correlationId: string - (optional) transaction id used to trace execution through the call chain.
  • returns: error - error or nil if no errors occurred.

SendLogs

Sends log messages.

(c *DataDogLogClient) SendLogs(ctx context.Context, correlationId string, messages []DataDogLogMessage) error

  • ctx: context.Context - operation context.
  • correlationId: string - (optional) transaction id used to trace execution through the call chain.
  • messages: []DataDogLogMessage - messages to send.
  • returns: error - error or nil if no errors occurred.

SetReferences

Sets references to dependent components.

(c *DataDogLogClient) SetReferences(ctx context.Context, refs IReferences)

  • ctx: context.Context - operation context.
  • references: IReferences - references to locate the component’s dependencies.