Module: Datadog::DataStreams

Defined in:
lib/datadog/data_streams.rb,
lib/datadog/data_streams/ext.rb,
lib/datadog/data_streams/processor.rb,
lib/datadog/data_streams/extensions.rb,
lib/datadog/data_streams/configuration.rb,
lib/datadog/data_streams/transport/http.rb,
lib/datadog/data_streams/pathway_context.rb,
lib/datadog/data_streams/transport/stats.rb,
lib/datadog/data_streams/transport/http/api.rb,
lib/datadog/data_streams/transport/http/stats.rb,
lib/datadog/data_streams/transport/http/client.rb,
lib/datadog/data_streams/configuration/settings.rb

Overview

Datadog Data Streams Monitoring public API.

The Datadog team ensures that public methods in this module only receive backwards compatible changes, and breaking changes will only occur in new major versions releases.

Defined Under Namespace

Modules: Configuration, Ext, Extensions, Transport Classes: PathwayContext, Processor, UnsupportedError

Class Method Summary collapse

Class Method Details

.enabled?Boolean

Check if Data Streams Monitoring is enabled and available



82
83
84
# File 'lib/datadog/data_streams.rb', line 82

def enabled?
  !processor.nil?
end

.set_consume_checkpoint(type:, source:, auto_instrumentation: false, tags: {}) {|key| ... } ⇒ String?

Set a consume checkpoint for Data Streams Monitoring

Yields:

  • (key)

    Block to extract context from carrier



46
47
48
49
50
51
52
53
54
# File 'lib/datadog/data_streams.rb', line 46

def set_consume_checkpoint(type:, source:, auto_instrumentation: false, tags: {}, &block)
  processor&.set_consume_checkpoint(
    type: type,
    source: source,
    manual_checkpoint: !auto_instrumentation,
    tags: tags,
    &block
  )
end

.set_produce_checkpoint(type:, destination:, auto_instrumentation: false, tags: {}) {|key, value| ... } ⇒ String?

Set a produce checkpoint for Data Streams Monitoring

Yields:

  • (key, value)

    Block to inject context into carrier



27
28
29
30
31
32
33
34
35
# File 'lib/datadog/data_streams.rb', line 27

def set_produce_checkpoint(type:, destination:, auto_instrumentation: false, tags: {}, &block)
  processor&.set_produce_checkpoint(
    type: type,
    destination: destination,
    manual_checkpoint: !auto_instrumentation,
    tags: tags,
    &block
  )
end