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

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ