Repository navigation
|
I'd like to opt out of using telemetry, how can I disable it when using the UA stack for .NET? I've noticed that none of the ITelemetryContext objects are nullable or did I miss something, so sending null as the value could cause issues? I'm assuming the best way to turn off telemetry is to pass a null logger factory like so. Curious if this is not conforming to best practices or proper design of the UA stack? ` } |
Replies: 2 comments 3 replies
|
@js10x - passing null is ok (only a small part is annotated nullable, but it is also not something that is explicitly suggested by us), or -better- you pass your own NullTelemetry. But I am curious why you would not want to be able to observe your application or at least have some ability to "file a bug" if something does not work in the stack. Any specific reasons? |
|
To summarize, with a corrected link (the
Closing as answered. |
To summarize, with a corrected link (the
Observability.mdpage linked above moved): see Diagnostics: telemetry context.ITelemetryContextis not a data-collection or "phone home" feature. It bundles theILoggerFactory,MeterandActivitySourcethe stack logs to inside your process. Nothing is exported unless you wire up an exporter yourself.