generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
area/tracingCore tracing utilityCore tracing utilityfeature-requestNew or enhancements to existing featuresNew or enhancements to existing features
Description
Use case
Currently X-Ray sdk has limitations on the types it supports for Metadata serialization, for instance it does not support, GUID, int64, Decimals and others. Some issues open here and here
Since we control the input for Metadata to X-Ray we will sanitize the input so customers will not have the error as reported here
Solution/User Experience
Handle the sanitization of the types that get serialized
For instance returning this object will fail, with this release it will be fixed
[Tracing]
public async Task<object> FunctionHandler(object input, ILambdaContext context)
{
var details = new
{
SystemInfo = new
{
DotNetVersion = Environment.Version.ToString(),
RuntimeVersion = RuntimeInformation.FrameworkDescription,
OSDescription = RuntimeInformation.OSDescription,
OSArchitecture = RuntimeInformation.OSArchitecture.ToString(),
ProcessArchitecture = RuntimeInformation.ProcessArchitecture.ToString(),
RuntimeIdentifier = RuntimeInformation.RuntimeIdentifier,
MachineName = Environment.MachineName,
ProcessorCount = Environment.ProcessorCount,
WorkingSet = Environment.WorkingSet,
Is64BitOperatingSystem = Environment.Is64BitOperatingSystem,
Is64BitProcess = Environment.Is64BitProcess,
CLRVersion = Environment.Version.ToString(),
CurrentDirectory = Environment.CurrentDirectory
},
LambdaInfo = new
{
FunctionName = context.FunctionName,
FunctionVersion = context.FunctionVersion,
InvokedFunctionArn = context.InvokedFunctionArn,
MemoryLimitInMB = context.MemoryLimitInMB,
RemainingTime = context.RemainingTime,
RequestId = context.AwsRequestId,
LogGroupName = context.LogGroupName,
LogStreamName = context.LogStreamName
}
};
return details;
}
Alternative solutions
Acknowledgment
- This feature request meets Powertools for AWS Lambda (.NET) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and TypeScript
Metadata
Metadata
Assignees
Labels
area/tracingCore tracing utilityCore tracing utilityfeature-requestNew or enhancements to existing featuresNew or enhancements to existing features
Type
Projects
Status
🏗 In progress