Skip to content

fix(chronosphere): traces endpoint 404 + auto-enable traces + report trace URL#515

Merged
mayankpande88 merged 3 commits into
mainfrom
fix/chronosphere-traces-endpoint
Jul 10, 2026
Merged

fix(chronosphere): traces endpoint 404 + auto-enable traces + report trace URL#515
mayankpande88 merged 3 commits into
mainfrom
fix/chronosphere-traces-endpoint

Conversation

@mayankpande88

@mayankpande88 mayankpande88 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Makes Chronosphere traces work end-to-end for a customer whose Traces view showed No Data Available despite the provider being detected correctly.

1. Wrong trace endpoint (the functional bug)

The Go client POSTed to /api/unstable/data/traces/searches, which Chronosphere 404s. The correct path (legacy agent's, and the one the backend builds the ListTraces body for) is /api/v1/data/traces.

Verified live against the customer's Chronosphere:

POST /api/unstable/data/traces/searches           → 404 "No endpoint found"
POST /api/v1/data/traces  {query_type,start,end}  → 200 with real traces

2. Chart: auto-enable the traces provider

The Traces status reads CHRONOSPHERE_TRACES_ENABLED, which the chart never wired — so it needed a raw additional_env_vars workaround even though runner.chronosphere.url was set. Now setting runner.chronosphere.url also emits CHRONOSPHERE_TRACES_ENABLED=true (new runner.chronosphere.tracesEnabled, default true) plus optional CHRONOSPHERE_TRACES_URL.

3. Report the trace endpoint instead of localhost

For the Chronosphere provider the agent reported an empty traces URL, so the health panel showed a localhost placeholder. traceURL() now returns the explicit traces URL (or CHRONOSPHERE_URL).

Tests

Unit tests updated/added (endpoint path, traceURL for chronosphere). go build, go vet, full go test ./..., gofmt, and helm template all pass. Live end-to-end query returns real trace data. Chart bumped to 0.1.9.

…ble path)

The Go chronosphere client POSTed trace queries to
/api/unstable/data/traces/searches, which Chronosphere returns 404 for
('No endpoint found'). The correct endpoint — and the one the legacy agent
uses, and the one the backend builds the ListTraces body for (query_type,
tag_filters, time range) — is /api/v1/data/traces. Verified directly against
Chronosphere: the unstable path 404s, /api/v1/data/traces accepts the request
(400 'query type is required' with an empty body, i.e. endpoint + Bearer auth
are valid). This is why the Traces view showed 'No Data Available' despite the
provider being correctly detected as Chronosphere.

Chart bumped to 0.1.9.
@mayankpande88 mayankpande88 requested a review from a team as a code owner July 10, 2026 10:26

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Chronosphere trace query API path from /api/unstable/data/traces/searches to /api/v1/data/traces in both the client implementation and its corresponding tests, as the previous path returned 404 errors. Additionally, the Helm chart version for nudgebee-agent has been bumped to 0.1.9. I have no feedback to provide.

RamanKharchee
RamanKharchee previously approved these changes Jul 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Image Tags Updated

I've automatically updated the image tags in `charts/nudgebee-agent/values.yaml` to the latest versions from GHCR for the `main` branch.

The image tags are now synchronized with the latest builds and ready for release.

@mayankpande88 mayankpande88 changed the title fix(chronosphere): correct trace endpoint to /api/v1/data/traces (was 404) fix(chronosphere): traces endpoint 404 + auto-enable traces + report trace URL Jul 10, 2026
…nt URL

Two follow-on fixes so Chronosphere traces work without workarounds:

- Chart: setting runner.chronosphere.url now also emits
  CHRONOSPHERE_TRACES_ENABLED=true (new runner.chronosphere.tracesEnabled,
  default true) and optional CHRONOSPHERE_TRACES_URL. Previously the traces
  status flag had no values key and needed a raw additional_env_vars entry.

- Telemetry: traceURL now reports the Chronosphere endpoint (explicit traces
  URL, else CHRONOSPHERE_URL) for the chronosphere provider instead of empty,
  so the health panel shows the real backend instead of a 'localhost'
  placeholder.
@github-actions

Copy link
Copy Markdown
Contributor

📦 Image Tags Updated

I've automatically updated the image tags in `charts/nudgebee-agent/values.yaml` to the latest versions from GHCR for the `main` branch.

The image tags are now synchronized with the latest builds and ready for release.

@mayankpande88 mayankpande88 merged commit 3d1cca8 into main Jul 10, 2026
7 checks passed
@mayankpande88 mayankpande88 deleted the fix/chronosphere-traces-endpoint branch July 10, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants