Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/prometheus/client_golang v1.23.2
github.com/redis/go-redis/v9 v9.19.0
github.com/stretchr/testify v1.11.1
github.com/uber-go/tally v3.5.0+incompatible
github.com/uber-go/tally v5.0.0+incompatible

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

`For github.com/uber-go/tally v5.0.0+incompatible:

  1. Are tally.NewRootScope and tally.ScopeOptions (Prefix, Tags, CachedReporter, Separator) API-compatible with v3.5.0?
  2. Did default reporting interval, scope caching/pooling, or tag/key generation semantics change between v3.5.0 and v5.0.0?
  3. Are there migration notes for promreporter integrations that could affect metric names, cardinality, or lifecycle/Close behavior?
    Please provide links to official release notes/changelog/commits.`

💡 Result:

  1. API compatibility of tally.NewRootScope and tally.ScopeOptions (v3.5.0 vs v5.0.0) Based on the current upstream source for ScopeOptions and NewRootScope, the fields/shape you named exist with the same top-level names: ScopeOptions has Prefix, Tags, CachedReporter, Separator (and Reporter), and NewRootScope signature is NewRootScope(opts ScopeOptions, interval time.Duration) (Scope, io.Closer). [1] However, I could not retrieve the exact v3.5.0 (tag/commit) source in the material gathered here to conclusively prove there were no field additions/behavioral changes specifically between v3.5.0 and v5.0.0. What we can say with evidence is that the named options exist and NewRootScope takes the same parameter types and returns (Scope, io.Closer) in the upstream code. [1] 2) Changes in default reporting interval, scope caching/pooling, or tag/key generation semantics (v3.5.0 vs v5.0.0) I did not find authoritative release-notes text in the gathered results that explicitly compares v3.5.0 vs v5.0.0 for any of the following: default reporting interval, scope caching/pooling, or tag/key generation semantics. What I can cite from upstream source is that ScopeOptions uses DefaultSeparator when Separator is empty and that Tags are copied/sanitized at scope creation (so mutation of the map after scope construction is not reflected). [1] Additionally, the repository releases page contains an entry explicitly mentioning “Set default reporting interval” (but the snippet does not identify the exact version boundary between v3.5.0 and v5.0.0). [2] So: there is evidence that separator defaults and tag sanitization/copying are part of the scope creation semantics, but there is not enough evidence in the provided search results to say those semantics changed specifically between v3.5.0 and v5.0.0. 3) Migration notes for promreporter integrations that could affect metric names, cardinality, or lifecycle/Close behavior I did not find promreporter-specific migration notes in the gathered results. But there is evidence of lifecycle/Close semantics changes in tally in general: the commit introducing independent subscope closing through io.Closer (#158) shows that closing a non-root scope doesn’t report registry / doesn’t close the base reporter; the root scope reports the registry before closing and then closes the base reporter (if it implements io.Closer). [3] This can affect metric emission timing/lifecycle if your integration assumes Close always flushes/removes registry entries immediately for all scopes. On metric naming/cardinality semantics with Prometheus-style reporting: the repository docs warn that when using Prometheus reporters, users must avoid creating metrics from both parent scopes and subscopes that share the same metric name but different tag keys, as metric allocation can panic. [4] And for tag/key normalization differences (which can affect metric names/cardinality), I found a downstream integration note in Temporal’s PR about tally→OpenTelemetry migration stating that tally replaces dashes with underscores in both tag keys and values (while OTEL differs). This PR is not tally’s official migration guide, but it is an example of a semantics difference that could affect metric cardinality and naming if you port from tally. [5] Official release notes / changelog / commits - Official releases page: https://github.com/uber-go/tally/releases [2] - Scope implementation (NewRootScope + ScopeOptions fields and tag copy/sanitize; default separator behavior): https://github.com/uber-go/tally/blob/master/scope.go [1] - Independent subscope closing behavior (commit #158): uber-go/tally@2499bd2 [3] - Prometheus usage caveat about parent/subscope tag-key mismatch (types.go comment): https://github.com/uber-go/tally/blob/88c09fd7917eb50cecb296ead18bd72493190fac/types.go [4] - Temporal PR referencing tally tag normalization behavior during migration: Add backward compatibility configs for tally to otel migration temporalio/temporal#7235 [5] Confidence/limitations I can confidently point to upstream code for the API shape of ScopeOptions/NewRootScope and to upstream commits/comments describing Close and Prometheus allocation caveats. [1][3][4] But I cannot, from the gathered sources, provide a definitive, version-by-version statement about what changed specifically between v3.5.0 and v5.0.0 for default reporting interval, scope caching/pooling, or tag/key generation semantics, nor can I cite a promreporter-specific migration section for v3.5.0→v5.0.0. If you want, I can run one more targeted search round specifically for: (a) v3.5.0 release notes/changelog entry, (b) the v5.0.0 release entry around reporting interval / registry caching / tag sanitization, and (c) promreporter (or prometheus reporter) migration notes or changesets that mention metric naming/cardinality and Close/flush behavior.

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n "NewRootScope|ScopeOptions|CachedReporter|Separator|promreporter|prometheus|Close\(" -S pkg/metrics || true
ls -la pkg/metrics || true
if [ -f pkg/metrics/metrics.go ]; then sed -n '1,220p' pkg/metrics/metrics.go; fi
if [ -f pkg/metrics/metrics_test.go ]; then sed -n '1,260p' pkg/metrics/metrics_test.go; fi

Repository: kubeservice-stack/common

Length of output: 9723


🌐 Web query:

tally v5.0.0 breaking changes ScopeOptions CachedReporter Separator Close io.Closer

💡 Result:

The version v5.0.0+incompatible of the uber-go/tally Go library appears to be problematic or potentially mislabeled [1][2]. Users have reported that attempting to use this version results in build errors, such as redeclarations and undefined methods (e.g., scopes.Inc), suggesting it may not be a stable or intended release in the context of the established v3.x or v4.x versions [1]. Regarding the specific components mentioned: - ScopeOptions, CachedReporter, Separator: These are standard, long-standing parts of the Tally API [3][4]. They are defined in the ScopeOptions struct used to initialize a root scope [3]. - Close and io.Closer: The NewRootScope function returns a Scope and an io.Closer [3][5]. The Closer is intended to be used to gracefully shut down the reporting goroutine [5]. Subscope closing functionality was explicitly enabled via io.Closer in earlier updates (e.g., #158) [6], which allowed independent subscope cleanup. If you are encountering build issues with v5.0.0, it is highly recommended to revert to the latest stable release (e.g., v4.x or the latest v3.x, depending on your project requirements) [1]. Note: The search results also surface "Tally Release 5.0" in the context of TallyPrime accounting software [7][8][9]. This is a completely different product from the Go metrics library and is unrelated to the technical API components you listed.

Citations:


🌐 Web query:

tally v3.5.0 release notes NewRootScope ScopeOptions CachedReporter Separator

💡 Result:

I can confirm what you’re asking maps to the Go library uber-go/tally’s API elements, but there aren’t any public “release notes” text/entry for version 3.5.0 beyond the release commit bumping the library version. 1) Tally v3.5.0 release notes / what changed - The “Release 3.5.0” entry in the repo corresponds to a commit that only changes the Version constant from 3.4.3 to 3.5.0 in version.go [1][2]. 2) Where the mentioned identifiers come from (their meaning in the code) These identifiers are present in tally’s Scope implementation: - ScopeOptions includes fields Reporter, CachedReporter, and Separator (plus Tags/Prefix/DefaultBuckets/SanitizeOptions, etc.) [3]. - NewRootScope takes a ScopeOptions and a reporting interval, and returns (Scope, io.Closer). The README explains the second return value stops the scope’s reporting goroutine [4]. What’s NOT found in v3.5.0 release notes - In the available “Release 3.5.0” record, there’s no changelog text listing behavioral changes to NewRootScope, ScopeOptions, CachedReporter, or Separator—only the version number bump [1][2]. If you want, tell me whether you mean uber-go/tally (Go) or a different “tally” project, and what you consider “release notes” (GitHub release page text vs. CHANGELOG vs. commit diff). Then I can locate the exact notes text for that specific project/version.

Citations:


🌐 Web query:

uber-go tally v4 v5 migration notes prometheus reporter promreporter HTTPHandler Close flush interval semantics

💡 Result:

The uber-go/tally library currently lacks a stable, functional v5 release as of June 2026. Users attempting to use v5.0.0 have reported significant build errors and unresolved issues, making v4 the current standard version [1]. Migration to v5 is not recommended until the maintainers resolve these issues [1]. In regard to your questions about the Prometheus reporter, flush interval semantics, and HTTPHandler behavior, the following principles apply to the Tally framework (primarily as implemented in v4): Prometheus Reporter and HTTPHandler The Prometheus reporter in Tally is designed to work with the Prometheus Go client library [2][3]. It provides an HTTPHandler method, which returns an http.Handler that can be used to serve metrics for Prometheus scraping [2]. The reporter acts as a bridge between Tally's metric abstractions and Prometheus collectors [2]. Flush Interval Semantics Tally's flush behavior is driven by the root scope, not individual sub-scopes [4][5]. 1. Root Scope Responsibility: When a root scope is created with a reporting interval, it initializes a goroutine that runs a report loop [5]. 2. Periodic Flushes: This loop triggers a reportRegistry call, which performs the reporting and explicitly calls Flush on the reporter [5]. 3. Scope Closure: When a root scope is closed (Close is called), it performs one final flush to ensure that pending metrics are captured before the reporter is closed [5]. 4. Optimization: Logic exists to prevent redundant flushes, ensuring that Flush is typically called only once per reporting cycle from the root scope, rather than being triggered by every sub-scope [4]. If you are implementing custom reporters, note that the StatsReporter interface requires a Flush method [6]. For standard Tally usage, you do not need to manually manage these intervals; they are configured during the initialization of the root scope [5]. If you encounter unexpected flush behaviors, ensure that you are only calling Close on the root scope, as doing so on sub-scopes may not have the desired effect on global reporting [4][5].

Citations:


Validate uber-go/tally v5.0.0+incompatible scope/reporter lifecycle before merging.

This bump affects runtime metrics behavior because this repo:

  • builds a Prometheus reporter (promreporter.NewReporter) and root scope (tally.NewRootScope with CachedReporter + Separator: promreporter.DefaultSeparator and cfg.FlushInterval)
  • serves metrics via Reporter.HTTPHandler()
  • shuts down via the io.Closer returned from NewRootScope (Destroy() calls closer.Close()), so any change in flush/report-loop shutdown semantics can change what’s emitted and when.

Also, upstream user reports indicate github.com/uber-go/tally v5.0.0+incompatible may be problematic/mislabeled, and there’s no clearly discoverable v3.5.0→v5.0.0 migration/changelog text covering the runtime semantics this integration relies on.

Request: provide an upstream link (release notes/changelog/commits) specifically covering v3.5.0v5.0.0 behavior for:

  • tally.NewRootScope’s returned io.Closer contract (final flush + stopping the reporter loop)
  • Prometheus reporter behavior (promreporter): how HTTPHandler() sources metrics and whether separator/prefix/tag handling changed
  • flush/report interval timing semantics

github.com/uber-go/tally v5.0.0+incompatible

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@go.mod` at line 20, Provide upstream authoritative links (release notes,
changelog, or specific commits/PRs) that document behavioral changes from
v3.5.0→v5.0.0 of github.com/uber-go/tally affecting our integration:
specifically confirm the io.Closer contract returned by tally.NewRootScope (does
it still perform a final flush and stop reporter loops on Close/Destroy), any
changes to promreporter.NewReporter and Reporter.HTTPHandler behavior (how
metrics are sourced/served, and whether Separator/promreporter.DefaultSeparator
or tag/prefix handling changed), and any changes to flush/report interval timing
semantics (CachedReporter behavior and cfg.FlushInterval). Reference these
symbols in your findings: tally.NewRootScope, promreporter.NewReporter,
Reporter.HTTPHandler, CachedReporter, Separator/promreporter.DefaultSeparator,
cfg.FlushInterval, and Destroy/Closer, and include direct URLs to the upstream
release notes/commits/PRs that explicitly state the behavior differences.

github.com/vmihailenco/msgpack/v5 v5.4.1
go.etcd.io/etcd/api/v3 v3.5.21
go.etcd.io/etcd/client/v3 v3.5.21
Expand Down Expand Up @@ -77,6 +77,7 @@ require (
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/go-cmp v0.7.0 // indirect
Expand Down
5 changes: 3 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,7 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
Expand Down Expand Up @@ -1934,8 +1935,8 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg=
github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ=
github.com/uber-go/tally v3.5.0+incompatible h1:2vIkqVrSaspifqcJh2yQjQqqpfavvmfj/ognDrBxuSg=
github.com/uber-go/tally v3.5.0+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU=
github.com/uber-go/tally v5.0.0+incompatible h1:74zRlWs/k8FpgU8QlYhN51zkemZPuPfX6iJudMCmNWM=
github.com/uber-go/tally v5.0.0+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU=
github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA=
github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4=
github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8=
Expand Down
Loading