aws / aws-xray-sdk-node

The official AWS X-Ray SDK for Node.js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add more usage details in README?

JamesKyburz opened this issue · comments

The README states that AWS don't recommend using this SDK, however that's not the case if all you want is X-Ray. Also if using Node 18 with ESM handlers, then there currently is no other option than this SDK due to this issue.

https://docs.aws.amazon.com/xray/latest/devguide/xray-instrumenting-your-app.html#xray-instrumenting-choosing

We recommend choosing an X-Ray SDK for instrumenting your application if you need the following:

  • A tightly integrated single-vendor solution

  • Integration with X-Ray centralized sampling rules, including the ability to configure sampling rules from the X-Ray console and automatically use them across multiple hosts, when using Node.js, Python, Ruby, or .NET

Hi @JamesKyburz - thanks for pointing this out. We need to better align our documentation in these two places to reflect the latest AWS recommendation.

We are updating our documentation now to address the first issue. Regarding the ESM handler issue, can this SDK be used for ESM module applications? My understanding is we require you to wrap require statements, and that there is no workaround to do the same wrapping for ESM imports.