You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Defined in: [appkit/src/context/execution-context.ts:35](https://github.com/databricks/appkit/blob/main/packages/appkit/src/context/execution-context.ts#L35)
8
+
9
+
Get the current execution context.
10
+
11
+
- If running inside a user context (via asUser), returns the user context
-**Telemetry**: Instrument your plugin with traces and metrics via `this.telemetry`. See [`ITelemetry`](api/appkit/Interface.ITelemetry.md).
249
257
-**Execution interceptors**: Use `execute()` and `executeStream()` with [`StreamExecutionSettings`](api/appkit/Interface.StreamExecutionSettings.md)
250
258
259
+
**Consuming your plugin as an SDK**
260
+
261
+
Optionally, you may want to provide a way to consume your plugin in an imperative way using the AppKit object.
262
+
To do that, your plugin needs to implement the `sdk` method, returning an object with the API methods you want to expose. From the previous example, the plugin could be consumed as follows:
263
+
264
+
```ts
265
+
const AppKit =awaitcreateApp({
266
+
plugins: [
267
+
server({ port: 8000 }),
268
+
analytics(),
269
+
myPlugin(),
270
+
],
271
+
});
272
+
273
+
AppKit.myPlugin.myCustomMethod();
274
+
```
275
+
251
276
See the [`Plugin`](api/appkit/Class.Plugin.md) API reference for complete documentation.
0 commit comments