code: func (s *SessionRegistry) emitSessionJoinEvent(ctx *ServerContext) {
  	sessionJoinEvent := events.EventFields{
  		events.EventType:       events.SessionJoinEvent,
  		events.SessionEventID:  string(ctx.session.id),
  		events.EventNamespace:  s.srv.GetNamespace(),
  		events.EventLogin:      ctx.Identity.Login,
  		events.EventUser:       ctx.Identity.TeleportUser,
  		events.LocalAddr:       ctx.Conn.LocalAddr().String(),
  		events.RemoteAddr:      ctx.Conn.RemoteAddr().String(),
  		events.SessionServerID: ctx.srv.ID(),
  	}
  
  	// Emit session join event to Audit Log.
  	ctx.session.recorder.GetAuditLog().EmitAuditEvent(events.SessionJoin, sessionJoinEvent)
  
  	// Notify all members of the party that a new member has joined over the
  	// "x-teleport-event" channel.
  	for _, p := range s.getParties(ctx.session) {
  		eventPayload, err := json.Marshal(sessionJoinEvent)
  		if err != nil {
  			s.log.Warnf("Unable to marshal %v for %v: %v.", events.SessionJoinEvent, p.sconn.RemoteAddr(), err)
  			continue
  		}
  		_, _, err = p.sconn.SendRequest(teleport.SessionEvent, false, eventPayload)
  		if err != nil {
  			s.log.Warnf("Unable to send %v to %v: %v.", events.SessionJoinEvent, p.sconn.RemoteAddr(), err)
  			continue
  		}
  		s.log.Debugf("Sent %v to %v.", events.SessionJoinEvent, p.sconn.RemoteAddr())
  	}
  }
docs: // emitSessionJoinEvent emits a session join event to both the Audit Log as
  // well as sending a "x-teleport-event" global request on the SSH connection.