1# Trace Provider Library
2
3A static library for publishing a trace provider.  The trace manager
4connects to trace providers to collect trace records from running programs.
5
6To register the trace provider, the program must call `trace_provider_create()`
7at some point during its startup sequence.  The trace provider will take
8care of starting and stopping the trace engine in response to requests from
9the trace manager.
10
11## trace-provider-with-static-engine
12
13This library exists for very special cases, and in general should not be used.
14
15To use it, you will need to provide your own connection with trace-manager.
16This library does not come with the fdio support that the "normal" version
17of this library uses. See fdio_connect.cpp in this directory for boilerplate
18of what needs to be done. Then when you have the handle to trace-manager,
19call **trace_provider_create_with_name_etc()**.
20
21```
22trace_provider_t* trace_provider_create_with_name_etc(
23        zx_handle_t to_service_h, async_dispatcher_t* dispatcher,
24        const char* name);
25```
26
27N.B. This function will get renamed to remove the *_etc* suffix when
28all callers have been updated to call
29**trace_provider_create_with_name_fdio()**
30instead of **trace_provider_create_with_name()**.
31PT-63.
32
33You will need to add these dependencies to your BUILD.gn file:
34
35```
36    "//zircon/public/lib/trace-with-static-engine",
37    "//zircon/public/lib/trace-provider-with-static-engine",
38```
39