InstrumentationConfig type
Home > @rimitive/core > InstrumentationConfig
InstrumentationConfig type
Section titled “InstrumentationConfig type”Configuration for creating an instrumentation context.
Signature:
export type InstrumentationConfig = { providers: InstrumentationProvider[]; enabled?: boolean | (() => boolean);};References: InstrumentationProvider
Example 1
Section titled “Example 1”import { createInstrumentation, devtoolsProvider } from '@rimitive/core';
const instrumentation = createInstrumentation({ enabled: import.meta.env.DEV, // Only in development providers: [devtoolsProvider({ debug: true })],});Example 2
Section titled “Example 2”Dynamic enabled check
const instrumentation = createInstrumentation({ enabled: () => localStorage.getItem('debug') === 'true', providers: [devtoolsProvider()],});