[pull] main from SigNoz:main - #849
Merged
Merged
Conversation
…ld-key values (#12171) * fix(querybuildertypesv5): omit unset stepInterval on the wire Step is a struct (struct{ time.Duration }), so omitempty had no effect — an unset stepInterval serialized as 0 instead of being omitted, so a typed client reading a query back saw a 0 it never sent (create -> GET drift). Tag stepInterval with ,omitzero so an unset value is dropped while a set value still serializes (as seconds), on all three sites: builder query, trace-operator, and secondary aggregation. Schema-invisible (no OpenAPI / client change). source and the metric enums were already handled in #12164. * fix(telemetrytypes): round-trip empty fieldContext/fieldDataType on field keys A TelemetryFieldKey can deliberately leave fieldContext/fieldDataType empty to match across any context / data type, but ,omitzero dropped that empty value on serialize, so a typed client that sent "" read it back as absent (create -> GET drift). Make both fields always serialize and add the empty member to their Enum()s so "" is a valid schema value that round-trips verbatim — the same approach #12164 used for source. Signal keeps ,omitzero: its empty value is invalid for the query/variable signal contexts that share the enum (adding "" there breaks those consumers), and a field key's signal is not deliberately empty. Regenerate the OpenAPI spec + client (fieldContext/fieldDataType enums gain "") and update the ScalarData marshal test (column keys now echo the fields). * fix(telemetrytypes): round-trip empty signal on field keys Extend the field-key round-trip fix to Signal: add the empty member to Signal.Enum() and make TelemetryFieldKey.Signal always serialize, so an empty ("any") field-key signal round-trips as a valid value instead of being dropped — matching the fieldContext/fieldDataType treatment. The Signal enum is shared with query/variable signals, where "" is invalid. Narrow the frontend's TelemetrySignal type to logs/traces/metrics (so the variable/panel signal selectors stay exhaustive), label the empty member in the panel type switcher's map, and fold an empty drilldown signal into "all". Regenerate the OpenAPI spec + client (Signal enum gains ""), and update the ScalarData marshal test and the querierlogs aggregation label assertions to include the now-serialized empty signal.
… columns (#12176) A span/log query that aggregates or filters a numeric intrinsic column (e.g. duration_nano) failed with ClickHouse NO_COMMON_TYPE (386) when a same-named, type-consistent attribute existed in the metadata: field-key resolution unioned the intrinsic column with the attribute into a multiIf/OR whose branches had incompatible types (UInt64 intrinsic vs Float64 attribute). This broke /api/v1/span_percentile on affected tenants. - fallback_expr: DataTypeCollisionHandledFieldName now handles the unspecified data type in the projection/aggregation path (operator Unknown), coercing the column so collision multiIf branches share a supertype. Comparison contexts are left bare so the column index stays usable. - telemetrytraces/condition_builder: run collision handling for duration_nano (so a same-named string attribute is cast in comparisons) and coerce numeric duration values to int64, keeping the intrinsic comparison bare/index-friendly while preserving the duration-string QoL parsing. - tests: add a type-consistent "collision" trace_noise variant; cover it in the percentile aggregation test and add a duration_nano QoL filter regression test.
…ame and anchor matcher regexes (#12154) The read client reduced every __name__ matcher to metric_name = <value> (empty string when absent), so nameless selectors ({job="api"}), regex names ({__name__=~".+"}), and negations silently returned empty. Map the __name__ matcher onto the metric_name column per matcher type, drop the condition when no __name__ matcher exists, and narrow the samples query by the metric names the series lookup discovered. Matcher regexes are now anchored (^(?:...)$) the way Prometheus compiles them; ClickHouse match() is a substring search, so {job=~"api"} also matched job="api-server" before. The lookup and samples SQL is built with huandu/go-sqlbuilder (ClickHouse flavor) as in telemetrymetrics and the v2 transpiler: the samples query embeds the series lookup as a nested builder, with argument order merged by the builder in render position instead of hand-numbered placeholders. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )