custom-collector
Write a custom collector or context adapter
When an integration has no @eleven-labs/nest-profiler-* package, don't invent one — implement the public contract in the consumer's app. Two distinct extension points:
- Collector — adds a panel with data you gather during a request (a third-party client, a domain metric). Implement
IProfilerCollector. - Context adapter — teaches the profiler a non-HTTP protocol (gRPC, WebSockets, a custom message queue) so executions of that kind get profiled. Implement
IContextAdapter.
First confirm the core profiler is set up (setup-nest-profiler otherwise). Then pick the right extension point above from what the user is instrumenting.
Collector (IProfilerCollector)
Decorate a provider with @ProfilerCollector() and implement collect(profile). Key fields: name, label, icon, scope ('profile' default, or 'global' for once-per-list-page data like config), and optional getBadgeValue / getTemplatePath. Append entries with appendCollectorEntry(profile, name, entry) and read them back with getCollectorEntries. For query-style collectors, extend AbstractQueryCollector / AbstractSqlQueryCollector; for a home-page schema panel, AbstractSchemaCollector. To feed the performance-tagging engine, implement TaggableCollector (see the interpret-performance-tags skill).