hypertrace / hypertrace-service

Multiple hypertrace services combined together to form a single service.
Other
4 stars 15 forks source link

chore: for ease of debugging, adds options for java opts #94

Closed kotharironak closed 3 years ago

kotharironak commented 3 years ago

Description

For ease of debugging, this PR adds JAVA_OPTS environment for hypertrace-service. With these changes, now, we will able to debug from intellij using remote configuration.

Steps:

  1. Build the docker image locally if you have made any changes using gradle command gradlew dockerBuildImages
  2. Modify the docker-compose file as shown below by adding JAVA_OPTS and exposing 5005 debug port
    hypertrace:
    image: traceableai-docker.jfrog.io/hypertrace/hypertrace:test
    environment:
      - DATA_STORE_TYPE=postgres
      - POSTGRES_HOST=postgres
      - ZK_CONNECT_STR=zookeeper:2181/hypertrace-views
      - JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
    ports:
      - 2020:2020
      - 5005:5005
    healthcheck:
      start_period: 20s
    depends_on:
      postgres:
        condition: service_started
      kafka-zookeeper:
        condition: service_healthy
      pinot:
        condition: service_started
  3. User remote configuration of Intellij for attaching a debugger remote-config

Testing

Verified locally with docker-compose.