Files
zeekayandGitHub babbdec4b8 debrand: SigNoz -> O11y across the tree (+ otel-collector v0.144.7, schema cutover migration) (#28)
* debrand: signoz/SigNoz/SIGNOZ -> o11y/O11y/O11Y across the tree

Rename all SigNoz *branding* to O11y in file contents, file/dir names,
package names, env vars, config keys, comments, docs, SDK code, and the
ClickHouse schema identifiers the querier reads.

Collector dependency:
- Repoint github.com/hanzoai/signoz-otel-collector ->
  github.com/hanzoai/otel-collector and bump v0.144.6 -> v0.144.7
  (go.mod + go.sum reconciled via go mod tidy). Internal package paths
  also debranded upstream: signozschemamigrator -> o11yschemamigrator,
  signozlogspipelineprocessor -> o11ylogspipelineprocessor.
- Fix: v0.144.7 dropped otelconst.DistributedFieldKeysTable from the
  collector's public constants; pin FieldKeysTable = "distributed_field_keys"
  locally in pkg/telemetrymetadata/tables.go.

Package/dir renames (package decl + all importers):
  pkg/apiserver/signozapiserver -> o11yapiserver, plus signozalertmanager,
  signozauthzapi, signozglobal, signozquerier, signozruler, and pkg/signoz -> pkg/o11y.

Schema (read plane): signoz_traces/metrics/logs/metadata/analytics/meter and
signoz_index_v3/index_v2/error_index_v2/spans (+ distributed_*) -> o11y_*.
Data-preserving cutover migration added:
  deploy/clickhouse/migrations/0001_rename_signoz_to_o11y.sql
  (metadata-only RENAME DATABASE/TABLE, no drop/recreate).

Preserved (attribution / external / wire contracts):
- LICENSE + NOTICE verbatim (incl. "software from SigNoz", "Copyright ... SigNoz Inc.").
- Upstream github.com/SigNoz/* repo URLs + @SigNoz/* CODEOWNERS teams.
- Billing resource-attribute regex "signoz.workspace.*" (external wire contract).

go build ./pkg/... ./cmd/... = 0; gofmt clean; renamed+schema pkg tests pass.

* o11y: bump collector to v0.144.8 (o11y_* physical schema writer) + lockstep deploy plan

Collector v0.144.8's schema-migrator + exporters now CREATE/WRITE the same
o11y_* physical databases/tables the querier reads and the RENAME migration
(0001_rename_signoz_to_o11y.sql) targets.

Cross-checked byte-identical: writer DB set == migration target DB set (6);
writer prefixed-table set == migration target table set (8); o11y querier
reads and cloud reads are subsets of that set. Zero table-name mismatches
between writer, readers, and migration.

Collector go.mod unchanged between v0.144.7 and v0.144.8 (identical go.mod
hash) — pure source rename, no module-graph change.

Adds deploy/clickhouse/DEPLOY_signoz_to_o11y_cutover.md: the lockstep order
(collector v0.144.8 -> RENAME migration -> o11y+cloud readers) with a
fresh/scratch-ClickHouse pre-flight (create via migrator, emit trace+metric,
query back) and rollback. Ships together or telemetry blackholes.

go build ./pkg/... ./cmd/community = 0.
2026-07-09 13:08:55 -07:00

351 lines
7.7 KiB
Go

// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
package model
import (
json "encoding/json"
easyjson "github.com/mailru/easyjson"
jlexer "github.com/mailru/easyjson/jlexer"
jwriter "github.com/mailru/easyjson/jwriter"
)
// suppress unused package warning
var (
_ *json.RawMessage
_ *jlexer.Lexer
_ *jwriter.Writer
_ easyjson.Marshaler
)
func easyjson6ff3ac1dDecodeGoO11yIoO11yPkgQueryServiceModel(in *jlexer.Lexer, out *SearchSpanResponseItem) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeFieldName(false)
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "timestamp":
out.TimeUnixNano = uint64(in.Uint64())
case "durationNano":
out.DurationNano = int64(in.Int64())
case "spanId":
out.SpanID = string(in.String())
case "rootSpanId":
out.RootSpanID = string(in.String())
case "traceId":
out.TraceID = string(in.String())
case "hasError":
out.HasError = bool(in.Bool())
case "kind":
out.Kind = int32(in.Int32())
case "serviceName":
out.ServiceName = string(in.String())
case "name":
out.Name = string(in.String())
case "references":
if in.IsNull() {
in.Skip()
out.References = nil
} else {
in.Delim('[')
if out.References == nil {
if !in.IsDelim(']') {
out.References = make([]OtelSpanRef, 0, 1)
} else {
out.References = []OtelSpanRef{}
}
} else {
out.References = (out.References)[:0]
}
for !in.IsDelim(']') {
var v1 OtelSpanRef
easyjson6ff3ac1dDecodeGoO11yIoO11yPkgQueryServiceModel1(in, &v1)
out.References = append(out.References, v1)
in.WantComma()
}
in.Delim(']')
}
case "tagMap":
if in.IsNull() {
in.Skip()
} else {
in.Delim('{')
out.TagMap = make(map[string]string)
for !in.IsDelim('}') {
key := string(in.String())
in.WantColon()
var v2 string
v2 = string(in.String())
(out.TagMap)[key] = v2
in.WantComma()
}
in.Delim('}')
}
case "event":
if in.IsNull() {
in.Skip()
out.Events = nil
} else {
in.Delim('[')
if out.Events == nil {
if !in.IsDelim(']') {
out.Events = make([]string, 0, 4)
} else {
out.Events = []string{}
}
} else {
out.Events = (out.Events)[:0]
}
for !in.IsDelim(']') {
var v3 string
v3 = string(in.String())
out.Events = append(out.Events, v3)
in.WantComma()
}
in.Delim(']')
}
case "rootName":
out.RootName = string(in.String())
case "statusMessage":
out.StatusMessage = string(in.String())
case "statusCodeString":
out.StatusCodeString = string(in.String())
case "spanKind":
out.SpanKind = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjson6ff3ac1dEncodeGoO11yIoO11yPkgQueryServiceModel(out *jwriter.Writer, in SearchSpanResponseItem) {
out.RawByte('{')
first := true
_ = first
{
const prefix string = ",\"timestamp\":"
out.RawString(prefix[1:])
out.Uint64(uint64(in.TimeUnixNano))
}
{
const prefix string = ",\"durationNano\":"
out.RawString(prefix)
out.Int64(int64(in.DurationNano))
}
{
const prefix string = ",\"spanId\":"
out.RawString(prefix)
out.String(string(in.SpanID))
}
{
const prefix string = ",\"rootSpanId\":"
out.RawString(prefix)
out.String(string(in.RootSpanID))
}
{
const prefix string = ",\"traceId\":"
out.RawString(prefix)
out.String(string(in.TraceID))
}
{
const prefix string = ",\"hasError\":"
out.RawString(prefix)
out.Bool(bool(in.HasError))
}
{
const prefix string = ",\"kind\":"
out.RawString(prefix)
out.Int32(int32(in.Kind))
}
{
const prefix string = ",\"serviceName\":"
out.RawString(prefix)
out.String(string(in.ServiceName))
}
{
const prefix string = ",\"name\":"
out.RawString(prefix)
out.String(string(in.Name))
}
if len(in.References) != 0 {
const prefix string = ",\"references\":"
out.RawString(prefix)
{
out.RawByte('[')
for v4, v5 := range in.References {
if v4 > 0 {
out.RawByte(',')
}
easyjson6ff3ac1dEncodeGoO11yIoO11yPkgQueryServiceModel1(out, v5)
}
out.RawByte(']')
}
}
{
const prefix string = ",\"tagMap\":"
out.RawString(prefix)
if in.TagMap == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 {
out.RawString(`null`)
} else {
out.RawByte('{')
v6First := true
for v6Name, v6Value := range in.TagMap {
if v6First {
v6First = false
} else {
out.RawByte(',')
}
out.String(string(v6Name))
out.RawByte(':')
out.String(string(v6Value))
}
out.RawByte('}')
}
}
{
const prefix string = ",\"event\":"
out.RawString(prefix)
if in.Events == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
out.RawString("null")
} else {
out.RawByte('[')
for v7, v8 := range in.Events {
if v7 > 0 {
out.RawByte(',')
}
out.String(string(v8))
}
out.RawByte(']')
}
}
{
const prefix string = ",\"rootName\":"
out.RawString(prefix)
out.String(string(in.RootName))
}
{
const prefix string = ",\"statusMessage\":"
out.RawString(prefix)
out.String(string(in.StatusMessage))
}
{
const prefix string = ",\"statusCodeString\":"
out.RawString(prefix)
out.String(string(in.StatusCodeString))
}
{
const prefix string = ",\"spanKind\":"
out.RawString(prefix)
out.String(string(in.SpanKind))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v SearchSpanResponseItem) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjson6ff3ac1dEncodeGoO11yIoO11yPkgQueryServiceModel(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v SearchSpanResponseItem) MarshalEasyJSON(w *jwriter.Writer) {
easyjson6ff3ac1dEncodeGoO11yIoO11yPkgQueryServiceModel(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *SearchSpanResponseItem) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjson6ff3ac1dDecodeGoO11yIoO11yPkgQueryServiceModel(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *SearchSpanResponseItem) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjson6ff3ac1dDecodeGoO11yIoO11yPkgQueryServiceModel(l, v)
}
func easyjson6ff3ac1dDecodeGoO11yIoO11yPkgQueryServiceModel1(in *jlexer.Lexer, out *OtelSpanRef) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeFieldName(false)
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "traceId":
out.TraceId = string(in.String())
case "spanId":
out.SpanId = string(in.String())
case "refType":
out.RefType = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjson6ff3ac1dEncodeGoO11yIoO11yPkgQueryServiceModel1(out *jwriter.Writer, in OtelSpanRef) {
out.RawByte('{')
first := true
_ = first
if in.TraceId != "" {
const prefix string = ",\"traceId\":"
first = false
out.RawString(prefix[1:])
out.String(string(in.TraceId))
}
if in.SpanId != "" {
const prefix string = ",\"spanId\":"
if first {
first = false
out.RawString(prefix[1:])
} else {
out.RawString(prefix)
}
out.String(string(in.SpanId))
}
if in.RefType != "" {
const prefix string = ",\"refType\":"
if first {
first = false
out.RawString(prefix[1:])
} else {
out.RawString(prefix)
}
out.String(string(in.RefType))
}
out.RawByte('}')
}