1、Docker安装

参考:https://www.cnblogs.com/a120608yby/p/9883175.html

2、Docker Compose安装

参考:https://www.cnblogs.com/a120608yby/p/14582853.html

3、服务配置

# vim docker-compose.yml
version: '3.7'
services:
  jaeger:
    image: jaegertracing/all-in-one:latest
    container_name: jaeger
    restart: always
    ports:
      - "16686:16686"
      - "4318:4318"
    environment:
      - LOG_LEVEL=debug
    networks:
      - ops_default

  hotrod:
    image: jaegertracing/example-hotrod:latest
    container_name: hotrod
    restart: always
    ports:
      - "8080:8080"
      - "8083:8083"
    command: ["all", "--otel-exporter=otlp"]
    environment:
      - OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318
    networks:
      - ops_default
    depends_on:
      - jaeger

networks:
  ops_default:
    external: true

4、启动服务

docker-compose up -d

5、查看服务启动状态

docker-compose ps

6、访问

访问地址:http://部署主机IP:16686

参考:https://github.com/jaegertracing/jaeger/blob/main/examples/hotrod/docker-compose.yml

posted on 2023-08-29 14:51  a120608yby  阅读(603)  评论(0编辑  收藏  举报