otelcolcustom

package module
v0.0.0-...-d879a0d Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 0 Imported by: 0

README

Building a Custom OpenTelemetry Collector with Nix

ghpages badge Go Report Card GitHub Workflow Status

Why otelcol-custom ?

This project aims to demonstrate how to create custom OpenTelemetry Collectors with custom modules by leveraging the tools and methods used by the OpenTelemetry project. The structure of this project mimics the struture of the OpenTelemetry Collector Contrib repo to arrange the module in their own folders. Still, with this project I intend to provide an example of an entry level contribution on OpenTelemetry-collector module that would not aim to be merged with the core project.

So, in order to lower complexity to a more familiar level for occasionnal Go developper like me, I took some distance with some of the practices used in the OpenTelemetry that I personaly am not so big of a fan of, like:

  • I do not run the scripts through crypic Makefiles: I tend to minimize the reliability on Makefiles to only use Go base tooling, I prefer using commands like go generate ./... and that run script from Go magic comments and if special tools are required (like mdatagen) I invoke them from go run commands, reference here.
  • I do not use chloggen no any of the opentelemetry-go-build-tools (yet ?): my project is not at a maturity level where these tools would be benefical.
  • The project is built with Nix, althought it is not a hard dependancy and can be omited (and should by not conoiseurs), it allows to unify the build process and the required tooling. While Nix may have high potential on build reproductibility, I am not familiar enougth with the tool to use it in CI too, but I am looking forward to it, currently it is only used to provide a dev shell with Go and the ocb binary and to run ocb with on the ./builder-config.yaml file.
  • a Dockerfile defines the image specification of this custom OpenTelemetry container that can run all sub directories in the ./examples/ directory.
  • CI/CD is lighter and more leniant, it is defined as part of the playground repository.

Content

Module name Type of module Status Description
cyphergraph exporter In progress An exporter that send traces to a Neo4j compatible database and encoding traces in a hierarchical property graph

Project Status

  • Build a Custom Collector with Nix Flakes (#2)
  • Integrate a Skeleton of exporter module to add to this specific Collector build (#4)
  • Add the exporter logic

References

  1. Some blog explaining Nix to write derivations
  2. Internal of Nix to create an environment to build Go Modules
  3. A Collection of Articles about learning Nix

Documentation

Overview

Package otelcolcustom defines a demonstration OpenTelemetry Collector built with the current versions of the custom modules that are part of this project.

The collector is build with OpenTelemetry Collector Builder (ocb), its components have been defined in the manifest ./builder-config.yaml.

Directories

Path Synopsis
exporter

Jump to

Keyboard shortcuts

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