Skip to content

Conversation

@nikhilmantri0902
Copy link
Contributor

@nikhilmantri0902 nikhilmantri0902 commented Nov 30, 2025

📄 Summary

#7791 (comment)


✅ Changes

  • Feature: Brief description
  • Bug fix: Brief description

🏷️ Required: Add Relevant Labels

⚠️ Manually add appropriate labels in the PR sidebar
Please select one or more labels (as applicable):

ex:

  • frontend
  • backend
  • devops
  • bug
  • enhancement
  • ui
  • test

👥 Reviewers

Tag the relevant teams for review:

  • frontend / backend / devops

🧪 How to Test

  1. ...
  2. ...
  3. ...

🔍 Related Issues

Closes #


📸 Screenshots / Screen Recording (if applicable / mandatory for UI related changes)


📋 Checklist

  • Dev Review
  • Test cases added (Unit/ Integration / E2E)
  • Manually tested the changes

👀 Notes for Reviewers


Note

Introduces MetricsExplorer config (controls ClickHouse max_threads), renames treemap request field to mode, sets thread limits on queries, defaults stats ordering by samples, uses GLOBAL IN/anyLast, and requires edit access for metric metadata updates.

  • Metrics Explorer:
    • Config: New metricsexplorer config with telemetrystore.threads; wired through app init and tests.
    • Query execution: Applies max_threads via context on all ClickHouse queries/inserts.
    • Stats defaults: GetStats now defaults order-by to samples when unspecified.
    • Treemap API: Request field renamed to mode (from treemap); switch logic updated accordingly.
    • SQL tweaks: Use anyLast for metadata selection; use GLOBAL IN for candidate filtering; time conversions via ToNanoSecs.
    • Validation msgs: Clearer errors for histogram/summary label requirements.
  • API/Access control:
    • /api/v2/metrics/{metric_name}/metadata now requires EditAccess.
  • Plumbing/Tests:
    • Module constructors updated to accept MetricsExplorer config; tests adjusted.

Written by Cursor Bugbot for commit ea5a620. This will update automatically on new commits. Configure here.

@nikhilmantri0902 nikhilmantri0902 marked this pull request as draft November 30, 2025 18:54
@nikhilmantri0902 nikhilmantri0902 marked this pull request as ready for review December 1, 2025 05:54
Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

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

the multiple shards query modification is still pending. will let you know when it's bumped

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@therealpandey
Copy link
Collaborator

@nikhilmantri0902 we're reading config from the config package.

You can do:

metricsexplorer:
  threads:

OR

metricsexplorer:
  telemetrystore:
    threads:

(Deliberately not using the word clickhouse because the abstraction is called telemetrystore)

  1. Create a config.go in pkg/modules/metricsexplorer.
  2. Register this config in the config factory in signoz.
  3. Inject this config in the module.

@nikhilmantri0902
Copy link
Contributor Author

@therealpandey made changes for config via config factory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants