tree: a2b1b5c754490a214848b680333fa63cc8729006 [path history] [tgz]
  1. log_json/
  2. tests/
  3. backend.h
  4. BUILD.gn
  5. log_declares.h
  6. macros.h
  7. README.md
  8. registry.cpp
  9. registry.h
  10. scope.h
  11. scopes.h
  12. tracing_args.gni
src/tracing/README.md

Matter tracing

This library provides a runtime-configurable tracing and logging infrastructure for matter.

Types of data

Tracing

Tracing is mostly intended for following execution flow and measuring time spent for various operations. They are:

  • scoped where separate begin and end events are emitted or

  • instant where a single notable event is emitted, representing a point in time of a notable event

Tracing and instant values are set to know enumeration values at compile time, to allow implementation of backends that require compile-time strings for their tracing.

Data Logging

Data logging provides the tracing module the opportunity to report input/output data for matter data processing.

The data logging is generally limited in count and covers:

  • Messages, specifically sent matter requests and received matter responses

  • DNSSD operations as they are a core component of matter, specifically attempts to discover nodes as well as when a node is discovered or fails discovery.

Usage

Backends are defined by extending chip::Tracing::Backend in backend.h and registering it via functions in registry.h

Actual usage is controlled using macros.h (and for convenience scope.h provides scoped begin/end invocations).

tracing macros can be completely made a noop by setting ``matter_enable_tracing_support=false` when compiling.