Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting rid of Newtonsoft.Json dependency in OpenTelemetry.Instrumentation.AWSLambda #1523

Closed
birojnayak opened this issue Jan 4, 2024 · 2 comments · Fixed by #1544 or #1551
Closed
Labels
comp:instrumentation.awslambda Things related to OpenTelemetry.Instrumentation.AWSLambda

Comments

@birojnayak
Copy link
Contributor

This is not a bug but future direction for all AWS libraries those are part of Opentelemetry. We would like to make them AOT compatible

While investigating, OpenTelemetry.Instrumentation.AWSLambda takes dependency on Newtonsoft.Json. Are there any restriction on using System.Text.Json/JsonSerializer.Deserialize ? If not, let me know happy to submit PR.

                // AWSMessagingUtils , GetSnsMessage
                //snsMessage = JsonConvert.DeserializeObject<SNSEvent.SNSMessage>(body);
                snsMessage = JsonSerializer.Deserialize<SNSEvent.SNSMessage>(body);
@birojnayak birojnayak added the comp:instrumentation.awslambda Things related to OpenTelemetry.Instrumentation.AWSLambda label Jan 4, 2024
@birojnayak
Copy link
Contributor Author

@rypdal @Oberon00 ^^ thought on above

@Oberon00
Copy link
Member

Oberon00 commented Jan 5, 2024

Originally we used Newtonsoft because we wanted to support older .NET versions. But I had once already prepared a PR to remove the Newtonsoft depdendency: #1270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:instrumentation.awslambda Things related to OpenTelemetry.Instrumentation.AWSLambda
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants