Skip to content
Discussion options

You must be logged in to vote

To summarize, with a corrected link (the Observability.md page linked above moved): see Diagnostics: telemetry context.

  • ITelemetryContext is not a data-collection or "phone home" feature. It bundles the ILoggerFactory, Meter and ActivitySource the stack logs to inside your process. Nothing is exported unless you wire up an exporter yourself.
  • Metrics and activities cost practically nothing when no listener or exporter is attached. The remaining cost is logging, and that is controlled by the log level of the logger factory you pass in.
  • If you really want nothing, use exactly what you proposed. This is the documented opt-out:
    sealed class NullTelemetry : TelemetryContextBase
    {
        public Nu…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@js10x
Comment options

@romanett
Comment options

@marcschier
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by romanett
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants