Skip to content

Commit

Permalink
[docs] Remove service-extensions.md (open-telemetry#8890)
Browse files Browse the repository at this point in the history
**Description:** 

Removes service-extensions.md. The information is available over at
https://opentelemetry.io/docs/collector/configuration/#extensions and in
the Go documentation.

Adds information about service lifecycle to start and stop methods.
  • Loading branch information
mx-psi authored Nov 14, 2023
1 parent c6ba608 commit 9e65a56
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 147 deletions.
Binary file removed docs/images/design-service-lifecycle.png
Binary file not shown.
147 changes: 0 additions & 147 deletions docs/service-extensions.md

This file was deleted.

10 changes: 10 additions & 0 deletions service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ func New(ctx context.Context, set Settings, cfg Config) (*Service, error) {
}

// Start starts the extensions and pipelines. If Start fails Shutdown should be called to ensure a clean state.
// Start does the following steps in order:
// 1. Start all extensions.
// 2. Notify extensions about Collector configuration
// 3. Start all pipelines.
// 4. Notify extensions that the pipeline is ready.
func (srv *Service) Start(ctx context.Context) error {
srv.telemetrySettings.Logger.Info("Starting "+srv.buildInfo.Command+"...",
zap.String("Version", srv.buildInfo.Version),
Expand Down Expand Up @@ -170,6 +175,11 @@ func (srv *Service) Start(ctx context.Context) error {
return nil
}

// Shutdown the service. Shutdown will do the following steps in order:
// 1. Notify extensions that the pipeline is shutting down.
// 2. Shutdown all pipelines.
// 3. Shutdown all extensions.
// 4. Shutdown telemetry.
func (srv *Service) Shutdown(ctx context.Context) error {
// Accumulate errors and proceed with shutting down remaining components.
var errs error
Expand Down

0 comments on commit 9e65a56

Please sign in to comment.