-
Notifications
You must be signed in to change notification settings - Fork 291
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
NullReferenceException in DiagnosticsEventListener.OnEventWritten #341
Comments
@SergeyKanzhelev is there any way for us to disable this at all? Some way to get a call into |
How do you create telemetry configuration today? I'd recommend to instantiate it directly like this |
it doesn't look like we reference TelemetryConfiguration anywhere directly, it looks like we literally just do:
and then go on our way and set other properties and call methods on that client? |
You will get the default configuration then (.Active as Sergey pointed out). |
What's the implementation of |
so hypothetically, if we just add a |
You need to use this configuration when construct client as well: var t = new TelemetryConfiguration();
var client = new TelemetryClient(t); |
that gives me : "Telemetry channel should be configured for telemetry configuration before tracking telemetry." so there must be a little more configuration to do if i do that above? |
looks like explicitly setting the channel was all i needed (though i'm now setting ikey there too.) |
I'm glad you figured this out. |
For the main thread: I'm not closing bug as we still need to understand what may cause a |
Not clear what caused this, but added a safety check to prevent nullreference. |
Fixed via |
@gardnerjr and @ericc1103 reported
NullReferenceException
in the following stack:The text was updated successfully, but these errors were encountered: