Class MicrosoftTeamsLogEventObserver

  • All Implemented Interfaces:
    LogEventObserver

    public class MicrosoftTeamsLogEventObserver
    extends AbstractHttpPostJsonLogEventObserver
    Sends log messages to Microsoft Teams through a webhook extension. Must be configured with a .url property as a webhook. See Microsoft documentation on how to get a Webhook url. This observer batches messages as standard for AbstractBatchingLogEventObserver, using the idleThreshold, idleThreshold, and cooldownTime to determine when to flush the batch. It support AbstractFilteredLogEventObserver properties threshold, suppressMarkers and requireMarker to filter sent messages

    Example configuration:

     observer.teams=SlackLogEventObserver
     observer.teams.url=https://outlook.office.com/webhook/.../IncomingWebHook/...
     observer.teams.format.detailUrl=link to your LogEventsServlet
     observer.teams.threshold=WARN
     observer.teams.suppressMarkers=BORING_MARKER
     observer.teams.requireMarker=MY_MARKER, MY_OTHER_MARKER
     observer.teams.cooldownTime=PT10S
     observer.teams.maximumWaitTime=PT5M
     observer.teams.idleThreshold=PT5S
     observer.teams.includedMdcKeys=clientIp
     observer.teams.markers.MY_MARKER.throttle=PT1M PT10M PT30M
     observer.teams.markers.MY_MARKER.mdc=userId
     observer.teams.proxy=proxy.example.net:8888
     

    Implementation notes

    See Also:
    AbstractBatchingLogEventObserver, SlackLogEventsFormatter, ThrottlingBatcher