builder

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

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

View Source
var AllComponents = []Component{
	Injector,
	Java,
	Nodejs,
	Dotnet,
	Python,
	Meta,
}

AllComponents lists every buildable component in dependency order.

View Source
var Dotnet = Component{
	Name:        "dotnet",
	Description: dotnetDescription,
	InfoFunc:    dotnetInfo,
}

Dotnet is the opentelemetry-dotnet-autoinstrumentation package component.

View Source
var Injector = Component{
	Name:        "injector",
	Description: injectorDescription,
	InfoFunc:    injectorInfo,
}

Injector is the opentelemetry-injector package component.

View Source
var Java = Component{
	Name:        "java",
	Description: javaDescription,
	InfoFunc:    javaInfo,
}

Java is the opentelemetry-java-autoinstrumentation package component.

View Source
var Meta = Component{
	Name:        "meta",
	Description: metaDescription,
	InfoFunc:    metaInfo,
}

Meta is the opentelemetry metapackage component.

View Source
var Nodejs = Component{
	Name:        "nodejs",
	Description: nodejsDescription,
	InfoFunc:    nodejsInfo,
}

Nodejs is the opentelemetry-nodejs-autoinstrumentation package component.

View Source
var Python = Component{
	Name:        "python",
	Description: pythonDescription,
	InfoFunc:    pythonInfo,
}

Python is the opentelemetry-python-autoinstrumentation package component.

Functions

func Build

func Build(cfg Config, format string, comp Component) error

Build creates a single package file.

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

func ComponentByName(name string) (Component, bool)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL