
  [;1m-spec monitor(process, monitor_process_identifier(), [monitor_option()]) ->[0m
  [;1m                 MonitorRef[0m
  [;1m                 when MonitorRef :: reference();[0m
  [;1m             (port, monitor_port_identifier(), [monitor_option()]) ->[0m
  [;1m                 MonitorRef[0m
  [;1m                 when MonitorRef :: reference();[0m
  [;1m             (time_offset, clock_service, [monitor_option()]) ->[0m
  [;1m                 MonitorRef[0m
  [;1m                 when MonitorRef :: reference().[0m

[;;4mSince[0m:
  OTP @OTP-16718@

  Types:
    -type monitor_port_identifier() :: port() | registered_name().
    -type monitor_process_identifier() ::
          pid() | registered_process_identifier().
    -type registered_name() :: atom().
    -type registered_process_identifier() ::
          registered_name() | {registered_name(), node()}.

  Provides an option list for modification of monitoring
  functionality provided by [;;4mmonitor/2[0m. The [;;4mType[0m and [;;4mItem[0m
  arguments have the same meaning as when passed to [;;4mmonitor/2[0m.
  Currently available options:

  [;;4m[;;4m{alias, UnaliasOpt}[0m[0m:
    The returned monitor reference will also become an alias for
    the calling process. That is, the returned reference can be
    used for sending messages to the calling process. See also [;;4m[0m
    [;;4malias/0[0m. The [;;4mUnaliasOpt[0m determines how the alias should be
    deactivated.

    [;;4m[;;4mexplicit_unalias[0m[0m:
      Only an explicit call to [;;4munalias/1[0m will deactivate the
      alias.

    [;;4m[;;4mdemonitor[0m[0m:
      The alias will be automatically deactivated when the
      monitor is removed. This either via an explicit call to [;;4m[0m
      [;;4mdemonitor/1[0m or when it is automatically removed at the
      same time as a [;;4m'DOWN'[0m message is delivered due to the
      monitor. The alias can also still be deactivated via a
      call to [;;4munalias/1[0m.

    [;;4m[;;4mreply_demonitor[0m[0m:
      The alias will be automatically deactivated when the
      monitor is removed (see [;;4mdemonitor[0m option above) or a
      reply message sent via the alias is received. When a reply
      message is received via the alias the monitor will also be
      automatically removed. This is useful in client/server
      scenarios when a client monitors the server and will get
      the reply via the alias. Once the response is received
      both the alias and the monitor will be automatically
      removed regardless of whether the response is a reply or a [;;4m[0m
      [;;4m'DOWN'[0m message. The alias can also still be deactivated
      via a call to [;;4munalias/1[0m. Note that if the alias is
      removed using the [;;4munalias/1[0m BIF, the monitor will still
      be left active.

  [;;4m[;;4m{tag, UserDefinedTag}[0m[0m:
    Replace the default [;;4mTag[0m with [;;4mUserDefinedTag[0m in the 
    monitor message delivered when the monitor is triggered. For
    example, when monitoring a process, the [;;4m'DOWN'[0m tag in the
    down message will be replaced by [;;4mUserDefinedTag[0m.
