Interface EventModifier

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface EventModifier
A modifier function that is used to enrich a given event as JSONObject. It receives context objects depending on the type of the event or null if no context is available. The returned event can be a modified version of the event JSON or null if the event should be dropped.
Since:
8.303
  • Method Summary

    Modifier and Type
    Method
    Description
    modifyEvent(JSONObject event, Object[] eventContext)
    A modifier function that is used to enrich a given event as JSONObject.
  • Method Details

    • modifyEvent

      JSONObject modifyEvent(JSONObject event, Object[] eventContext)

      A modifier function that is used to enrich a given event as JSONObject.

      It receives context objects depending on the type of the event or null if no context is available. The returned event can be a modified version of the event JSON or null if the event should be dropped.

      Lists the events that Dynatrace monitors and the context parameters that are provided for each event.
      Event Context parameters Description
      OkHttp request monitoring (success) [Request, Response, null] Request and Response types from OkHttp framework
      OkHttp request monitoring (failed) [Request, null, Throwable] Request type from OkHttp framework
      HttpURLConnection request monitoring null No context provided because information can't be accessed afterwards
      Dynatrace.sendEvent(JSONObject fields, Object[] eventContext) eventContext Value provided by parameter
      Manual web request monitoring, identify user, (manual) error reporting null No context defined
      Crash reporting [Throwable, Thread] Provides the Thread where the crash occurs
      Cross-platform events null There is no data type conversion between different languages, so the context object is not defined
      Parameters:
      event - a deep copy of the current JSON event
      eventContext - additional objects that contain contextual information for this event or null if there is none available
      Returns:
      the modified event or null if the event should be dropped