Documentation
¶
Overview ¶
Package builder creates OpenTelemetry DEB and RPM packages using nfpm.
Each component (injector, java, nodejs, dotnet, meta) is described as a Component that knows how to populate an nfpm.Info with the correct metadata, file contents, and lifecycle scripts. The Build function takes a Config, a format string ("deb" or "rpm"), and a Component, and writes the package file to the output directory.
Index ¶
Constants ¶
This section is empty.
Variables ¶
AllComponents lists every buildable component in dependency order.
var Dotnet = Component{
Name: "dotnet",
Description: dotnetDescription,
InfoFunc: dotnetInfo,
}
Dotnet is the opentelemetry-dotnet-autoinstrumentation package component.
var Injector = Component{
Name: "injector",
Description: injectorDescription,
InfoFunc: injectorInfo,
}
Injector is the opentelemetry-injector package component.
var Java = Component{
Name: "java",
Description: javaDescription,
InfoFunc: javaInfo,
}
Java is the opentelemetry-java-autoinstrumentation package component.
var Meta = Component{
Name: "meta",
Description: metaDescription,
InfoFunc: metaInfo,
}
Meta is the opentelemetry metapackage component.
var Nodejs = Component{
Name: "nodejs",
Description: nodejsDescription,
InfoFunc: nodejsInfo,
}
Nodejs is the opentelemetry-nodejs-autoinstrumentation package component.
var Python = Component{
Name: "python",
Description: pythonDescription,
InfoFunc: pythonInfo,
}
Python is the opentelemetry-python-autoinstrumentation package component.
Functions ¶
Types ¶
type Component ¶
type Component struct {
Name string
Description string
// InfoFunc builds an nfpm.Info for this component. It returns the info,
// a cleanup function that removes any staging directories, and an error.
// The cleanup function must be called after packaging completes.
InfoFunc func(cfg Config, format string) (info *nfpm.Info, cleanup func(), err error)
}
Component describes a single package to build.
func ComponentByName ¶
ComponentByName returns the Component with the given name.
type Config ¶
type Config struct {
Version string // Package version (without leading "v")
Arch string // Target architecture: amd64 or arm64
PackagingDir string // Absolute path to the packaging/ directory
OutputDir string // Absolute path to the output directory
// ConfigCheckBinary is the path to a prebuilt otel-config-check binary
// for the target architecture, shipped inside the Python package. The
// builder only assembles packages; the binary is cross-compiled upfront
// (see the otel-config-check Makefile target).
ConfigCheckBinary string
}
Config holds build-wide settings.