AWS X-ray local get segment data

0

I have local xray daemon running on my mac and I am testing a graphql lambda the instrument traces. I am using serverless offline for testing the lambda. The daemon logs show Successfully sent batch of 9 segments (0.318 seconds) but I am not able to see any traces in my console. Also, what other ways are there to view the segments that are being relayed. I wanted to test my xray instrumenting but there is no way to know what segments are being trace and how. I do set my set profile before running the local daemon here is my serverless.yml, just in case I am missing something there

service: graphql-lambda

provider:
  name: aws
  runtime: nodejs16.x
  tracing:
    lambda: true
    apiGateway: true
  iamRoleStatements:
  - Effect: Allow
    Action:
      - "xray:PutTraceSegments"
      - "xray:PutTelemetryRecords"
    Resource: "*"
functions:
  graphql:
    handler: build/server.handler
    events:
      - http:
          path: graphql
          method: any
          cors: true
    environment:
      AWS_XRAY_DAEMON_ADDRESS: "127.0.0.1:2000"
      AWS_XRAY_CONTEXT_MISSING: "LOG_ERROR"

plugins:
  - serverless-offline
b3
已提问 6 个月前258 查看次数
1 回答
0
已回答 6 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则