aws / aws-xray-sdk-dotnet

The official AWS X-Ray SDK for .NET.
Apache License 2.0
109 stars 64 forks source link

AWS IoT SDK Support #220

Open NapalmCodes opened 2 years ago

NapalmCodes commented 2 years ago

I have enabled X-Ray tracing for a lambda function using the AWSSDKHandler.RegisterXRayForAllServices() method of the X-Ray SDK (before instantiating any SDK clients). Nuget AWSXRayRecorder.Handlers.AwsSdk (v2.8.3) was installed. It is now recording DynamoDB calls in my service map for me, but I noticed that none of the AWS IoT SDK calls are displaying in the service map. Is this not supported yet? Visibility to these service calls would be fantastic for us to have in our observability strategy.

srprash commented 2 years ago

Hi @napalm684 The AWSSDKHandler.RegisterXRayForAllServices() API is to instrument all the clients for AWS SDK only. AWS IoT SDK is not supported yet. Currently, we don't have it on our roadmap so it's difficult to say when would it be supported.

If you consider using OpenTelemetry for your lambda application, then I would recommend you open a feature request here as it has great support for existing instrumentations and for adding more library instrumentations as well.

Thanks!

NapalmCodes commented 2 years ago

Hi @srprash

Is AWS recommending we move away from AWS X-Ray SDK towards OpenTelemetry for all observability needs in the future?

It is disappointing that the IoT core support in the AWS SDKs doesn't seem to have feature parity with other language/development platforms. Is there some motivation behind this (i.e.: not many customers using .NET for IoT implementations)?

willarmiros commented 2 years ago

Is AWS recommending we move away from AWS X-Ray SDK towards OpenTelemetry for all observability needs in the future?

We are recommending that customers try out the AWS Distro for OpenTelemetry if they're looking for new instrumentations, since OTel has a much larger collection of supported libraries/frameworks for instrumentation due to their larger community and first-class X-Ray support. Generally speaking there is more bandwidth for such new features from the OTel community.

Regarding the lack of IoT support, unfortunately I don't think the X-Ray team has much knowledge here, you may need to ask on an AWS IoT repo or forum if possible.

NapalmCodes commented 2 years ago

I will reach out to our enterprise support team. Thanks for letting me know @willarmiros .

cforce commented 1 month ago

@willarmiros Is there still no out of the box support by AWS IOT core for open telemetry , especially to support w3c trace ids for iot core and connected la`bmdas? https://w3c.github.io/trace-context-mqtt/#json-payload