Skip to content

chore: add hostname to profile export - #3117

Draft
Noroth wants to merge 1 commit into
mainfrom
ludwig/router-594-router-add-unique-identifier-tag-per-router
Draft

chore: add hostname to profile export#3117
Noroth wants to merge 1 commit into
mainfrom
ludwig/router-594-router-add-unique-identifier-tag-per-router

Conversation

@Noroth

@Noroth Noroth commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Pyroscope profiles are aggregated by tags, so essentially when we aggregate by federated graph id, we might end up seeing multiple profiles accumulated because multiple router instances use the same graph api token.

This PR adds hostname as an additional tag.

Summary by CodeRabbit

  • Enhancements
    • Pyroscope telemetry now includes the router’s hostname, providing more detailed monitoring context.

Checklist

Open Source AI Manifesto

This project follows the principles of the Open Source AI Manifesto. Please ensure your contribution aligns with its principles.

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

Router image scan passed

✅ No security vulnerabilities found in image:

ghcr.io/wundergraph/cosmo/router:sha-4908123b03a68db2349b60d896fbe81169face6f

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e6720a6f-2e0e-4a61-9caa-5b5c96e5bf23

📥 Commits

Reviewing files that changed from the base of the PR and between 92df9e1 and 9fb53e8.

📒 Files selected for processing (1)
  • router/core/router.go

Walkthrough

Changes

Pyroscope tagging

Layer / File(s) Summary
Add hostname profiler tag
router/core/router.go
Pyroscope configuration now adds the router hostname alongside the existing default tags.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the change: adding hostname tags to exported Pyroscope profiles.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 62.03%. Comparing base (8271c7d) to head (9fb53e8).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
router/core/router.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3117       +/-   ##
===========================================
+ Coverage   48.81%   62.03%   +13.22%     
===========================================
  Files        1130      262      -868     
  Lines      157426    30815   -126611     
  Branches    10880        0    -10880     
===========================================
- Hits        76842    19116    -57726     
+ Misses      78713    10186    -68527     
+ Partials     1871     1513      -358     
Files with missing lines Coverage Δ
router/core/router.go 70.27% <0.00%> (+0.34%) ⬆️

... and 880 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread router/core/router.go

// Add default tags to the config
maps.Copy(r.pyroscopeConfig.Tags, pyroscope.RouterVersionTags(versioninfo.New(Version, Commit, Date)))
r.pyroscopeConfig.Tags["hostname"] = r.hostName

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we make this router_hostname and also make it router_custom_modules below?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants