Files
signoz/docs/contributing/go
Pandey f52d89c338
Some checks failed
build-staging / prepare (push) Has been cancelled
build-staging / js-build (push) Has been cancelled
build-staging / go-build (push) Has been cancelled
build-staging / staging (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
docs(go): add types.md covering core-type and Postable/Gettable/Storable conventions (#10998)
* docs(go): add types.md covering core-type and Postable/Gettable/Storable conventions

Document the core-type-first pattern used across pkg/types/: always define
the domain type X, and introduce Postable/Gettable/Updatable/Storable
flavors only when their shape actually differs from X. Walk through
Channel (core only), AuthDomain (all four flavors), and Rule (the
in-progress v2 split) as worked examples.

* docs(go): drop Rule migration example from types.md

* docs(go): allow both NewFromX and ToX conversion forms in types.md

* docs(go): move validation guidance to core type X in types.md

* docs(go): drop exact file:line refs in types.md, use inline examples

* docs(go): split spelling guidance into Updatable and Storable bullets

* docs(go): trim conversion examples to Channel and AuthDomain

* docs(go): swap remaining examples to AuthDomain/Channel where possible
2026-04-19 16:35:47 +00:00
..
2026-03-23 21:46:56 +00:00

Go

This document provides an overview of contributing to the SigNoz backend written in Go. The SigNoz backend is built with Go, focusing on performance, maintainability, and developer experience. We strive for clean, idiomatic code that follows established Go practices while addressing the unique needs of an observability platform.

We adhere to three primary style guides as our foundation:

We recommend (almost enforce) reviewing these guides before contributing to the codebase. They provide valuable insights into writing idiomatic Go code and will help you understand our approach to backend development. In addition, we have a few additional rules that make certain areas stricter than the above which can be found in area-specific files in this package:

  • Abstractions - When to introduce new types and intermediate representations
  • Errors - Structured error handling
  • Endpoint - HTTP endpoint patterns
  • Flagger - Feature flag patterns
  • Handler - HTTP handler patterns
  • Integration - Integration testing
  • Provider - Dependency injection and provider patterns
  • Packages - Naming, layout, and conventions for pkg/ packages
  • Service - Managed service lifecycle with factory.Service
  • SQL - Database and SQL patterns
  • Types - Domain types, request/response bodies, and storage rows in pkg/types/