Getting Started

Getting Started

In order to get started with DevelopmentKitchen, you will need to setup an account and get an API key. You can sign up for an account here. Once signed up, you can create a new API key on the profile page.

TypeScript SDK

Once you have your API key, the next step is to install the JavaScript/TypeScript package that provides the logging framework. This is the primary mechanism through which your app will send log events to the DevelopmentKitchen cloud service.


Installing the SDK is similar to any other npm package - use your favorite package manager to install the package from the npm package repository. For example, with npm:

npm install @devkitchen/logging

Setup the logging framework with your API key

You can setup the logging framework with your API key programmatically using:

import { createLogger } from "@devkitchen/node-sdk";
const logger = createLogger({ apiKey: "<API Key>" });

Of course, we recommend that API keys are NOT inserted into your code as string literals. Instead, you should load the key from an environment variable or your favorite mechanism to configure your environment-specific settings.

Creating your first log trail

Once you've got the logging framework setup, it's relatively simple to create your first log trail, and start emitting events.

In order to create a new log trail, simply call the createTrail method on the logger:

import { createLogger } from "@devkitchen/node-sdk";
const logger = createLogger();
const trail = logger.createTrail();
// You can then create events using the trail
trail.debug("Creating a new blog post in the database", query);

Logging features in your app

The previous example showed how you can emit a feature started event within a trail. If you emit a feature started event for a previously unknown event, DevelopmentKitchen will start tracking it as a new feature in your app.

You can tie a trail to one or more features in your app by emitting the featureStarted event for those features.

Similar to the featureStarted, you can also emit featureCompleted for features that successfully complete or featureFailed for features that fail to complete successfully.

You can use the online dashboard to manage features emitted from your app. The dashboard allows you to re-organize the features into a hierarchical tree, and to create features before they are emitted from your app.