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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南