-
Notifications
You must be signed in to change notification settings - Fork 494
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
OpenTelemetry - NullReferenceException #4080
Comments
We are using System.Text.Json serializer with cosmos client , if we comment JsonIgnore attribute on TTL property (example of attribute below), we get 100 % repro of null ref exception with default IsDistributedTracingEnabled being set to true. |
@alexaloni Thanks for reporting this. but I am not able replicate it locally. Can you please provide the code snippet to repro this error. |
@alexaloni I am able to replicate the issue and currently working on the fix. Meanwhile, the workaround is to either disable the IsDistributedTracingEnabled flag or if the flag is on then either subscribe to an operation level activity or network level activity. |
Using SDK 3.35.1-preview, we have 2 reports of NullReferenceException:
Another example:
The problem happens consistently. The way to repro it is generate any error condition, for example, attempt to Create a document that contains a
ttl
property withnull
value.Which generates a CosmosException, catch the CosmosException and try to print the Diagnostics.ToString()
Workaround currently is to disable Open Telemetry integration:
CosmosClientOptions.IsDistributedTracingEnabled = false
;The text was updated successfully, but these errors were encountered: