Skip to main content
Version: 2.0.0

Pipeline class - start()

The Pipeline class is the main entry point for passing observability data to Gentrace. start() is a method under this class. Learn more about using pipelines [here] (pipeline/basics).

start()

The start() method instantiates a new PipelineRun. A pipeline run captures all steps in that generative pipeline.

Arguments

context

The context argument is an object that contains the context for the PipelineRun. This context is associated with all steps in the generative pipeline. The object is represented by the PipelineContext type.

Read more about the PipelineContext types here.

Return value

The start() method returns a PipelineRun class instance. Read more about the PipelineRun class here.

Example

typescript
import { init, Pipeline } from "@gentrace/core";
 
init({
apiKey: process.env.GENTRACE_API_KEY
})
 
const pipeline = new Pipeline({
slug: "example-pipeline"
});
 
const runner = pipeline.start();
// runner is a PipelineRun instance