首页 > 解决方案 > 在 AWS Xray 中看不到痕迹

问题描述

我正在尝试使用 opencensus 在 AWS xray 上上传一些痕迹。痕迹的路线很简单:

client -> opencensus agent -> xray

我正在使用具有此配置的 docker-compose.yml:

version: '3.7'
services:
  #login
  login:
    build:
      context: .
      dockerfile: Dockerfile
    hostname: login
    ports:
      - 8080:8080
    volumes:
      - ./src:/app
  #ocagent
  ocagent:
    image: omnition/opencensus-agent
    volumes:
      - ./ocagent-config.yaml:/conf/ocagent-config.yaml
  #xray
  xray:
    image: amazon/aws-xray-daemon
    volumes:
      - ./.aws/:/root/.aws/
    command: -o -n eu-west-1 --bind=xray:2000

我的 opencensus 导出器到 aws 的配置文件是这样的:

exporters:
   aws-xray:
    region: "eu-west-1"
    version: "latest"
    buffer_size: 200

我将凭据作为环境变量上传。

当我运行docker-compose up我的服务启动并且一切正常但跟踪没有显示在控制台中时,似乎跟踪在路由中丢失了(可能是配置错误)。你能帮我吗?

标签: amazon-web-servicesdockerdevopsaws-xrayopencensus

解决方案


推荐阅读