hunk.code_window:         // We use a different analytics instance for sending events about the analytics system itself so we don't end up
           // in a recursive state.
           final LogProcessor logProcessorWithErrorHandler = new LogProcessor();
           final Analytics analytics = Analytics.builder(writeKey).log(logProcessorWithErrorHandler).build();
           logProcessorWithErrorHandler.onError(logData -> {
               analyticsOnAnalytics.enqueue(TrackMessage.builder("segment_error")
                       .properties(Map.of(
                               "message", logData.getMessage(),
                               "error", logData.getError().getMessage(),
  
hunk.labels: keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:         final Analytics analytics = Analytics.builder(analyticsWriteKey).log(logProcessorWithErrorHandler).build();
  
hunk.file_path: app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/SegmentConfig.java
hunk.type: replace
file: ---
  - name: Ensure old versions of Docker are not installed.
    package:
      name:
        - docker
        - docker-engine
      state: absent
  
  - name: Ensure dependencies are installed.
    apt:
      name:
        - apt-transport-https
        - ca-certificates
        - gnupg2
        - curl
      state: present
    become: yes
  
  - name: Add Docker apt key
    shell: >
      curl -sSL {{ docker_apt_gpg_key }} | sudo apt-key add -
    args:
      warn: false
    become: yes
  
  - name: Add Docker repository.
    apt_repository:
      repo: "{{ docker_apt_repository }}"
      state: present
      update_cache: true
    become: yes
  