Skip to main content

Builder interface for constructing the io.Insights API.

Properties (4)

Property Type Default Required Description
logger⚓︎ Logger x

Logger instance used by the builder and child managers.

metricsBuilder⚓︎ MetricsManagerBuilder x x

Metrics manager builder instance.

settings⚓︎ Partial<Settings> x x

Settings configuration for the API.

tracesBuilder⚓︎ TracesManagerBuilder x x

Traces manager builder instance.

5 Methods

build()⚓︎

() => API

Builds and returns the configured API container.

Returns

The fully configured API container

withLogger()⚓︎

(logger: Logger) => this

Sets the logger to be used by the observability system.

Parameters (1)

Name Type Required Description
logger⚓︎ Logger
  • The logger implementation to use

Returns

The builder instance for method chaining

withMetrics()⚓︎

Initializes the metrics manager builder.

Returns

The metrics manager builder for further configuration

withSettings()⚓︎

(settings: Partial<Settings>) => this

Sets the configuration settings for the observability system.

Parameters (1)

Name Type Required Description
settings⚓︎ Partial<Settings>
  • The settings to apply

Returns

The builder instance for method chaining

withTraces()⚓︎

Initializes the traces manager builder.

Returns

The traces manager builder for further configuration