| 1 |
// Copyright The OpenTelemetry Authors |
| 2 |
// SPDX-License-Identifier: Apache-2.0 |
| 3 |
|
| 4 |
package component // import "go.opentelemetry.io/collector/component" |
| 5 |
|
| 6 |
// BuildInfo is the information that is logged at the application start and |
| 7 |
// passed into each component. This information can be overridden in custom build. |
| 8 |
type BuildInfo struct { |
| 9 |
// Command is the executable file name, e.g. "otelcol". |
| 10 |
Command string |
| 11 |
|
| 12 |
// Description is the full name of the collector, e.g. "OpenTelemetry Collector". |
| 13 |
Description string |
| 14 |
|
| 15 |
// Version string. |
| 16 |
Version string |
| 17 |
|
| 18 |
// prevent unkeyed literal initialization |
| 19 |
_ struct{} |
| 20 |
} |
| 21 |
|
| 22 |
// NewDefaultBuildInfo returns a default BuildInfo. |
| 23 |
func NewDefaultBuildInfo() BuildInfo { |
| 24 |
return BuildInfo{ |
| 25 |
Command: "otelcol", |
| 26 |
Description: "OpenTelemetry Collector", |
| 27 |
Version: "latest", |
| 28 |
} |
| 29 |
} |