NOTE: Experimental; not yet fully documented and and details are subject to change.

Value

The $new() method returns an R6::R6 that inherits from lgr::Appender and can be uses as an appender by a lgr::Logger.

Super classes

lgr::Filterable -> lgr::Appender -> lgr::AppenderMemory -> AppenderDynatrace

Public fields

conn

a string url

conn

a string api_key. Also referred to as "Api Token"

Active bindings

conn

a string url

conn

a string api_key. Also referred to as "Api Token"

Methods

Inherited methods


Method new()

Usage

AppenderDynatrace$new(
  url,
  api_key,
  threshold = NA_integer_,
  layout = LayoutDynatrace$new(),
  buffer_size = 0,
  flush_threshold = "error",
  flush_on_exit = TRUE,
  flush_on_rotate = TRUE,
  should_flush = NULL,
  filters = NULL
)

Arguments

url

see section Fields

threshold, flush_threshold, layout, buffer_size

see lgr::AppenderBuffer A data data.frame. content of log


Method set_url()

Usage

AppenderDynatrace$set_url(url)


Method set_api_key()

Usage

AppenderDynatrace$set_api_key(api_key)


Method get_data()

Usage

AppenderDynatrace$get_data(n = 20L, threshold = NA, result_type = "data.frame")

Arguments

n

integer scalar. Retrieve only the last n log entries that match threshold

threshold

character or integer scalar. The minimum log level that should be displayed

result_type

character scalar. Any of:

  • data.frame

  • data.table (shortcut: dt)

  • list (unprocessed list with Dynatrace metadata)

  • json (raw Dynatrace JSON)

Returns

see result_type


Method show()

Usage

AppenderDynatrace$show(threshold = NA_integer_, n = 20)


Method flush()

Usage

AppenderDynatrace$flush()