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
asked 6 months ago244 views
1 Answer
0
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions