Skip to content

Conversation

@CustomIcon
Copy link

Description

Add peer_user field to peer connection status metrics to track user associations. The field uses user_id if available, otherwise defaults to "unknown". sample:
netbird_peer_connection_status_by_name{connected="true",peer_id="d3jrlkb8ksqc73eashr0",peer_name="DESKTOP-HJKSFGJ",peer_user="jhon.doe"} 1

Add peer_user field to peer connection status metrics to track user associations. The field uses user_id if available, otherwise defaults to "unknown".
sample:
`netbird_peer_connection_status_by_name{connected="true",peer_id="d3jrlkb8ksqc73eashr0",peer_name="DESKTOP-HJKSFGJ",peer_user="jhon.doe"} 1`
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

🛡️ External PR Security Check - Approval Required

This PR is from an external contributor and requires maintainer approval to run tests with secrets.

👥 For Maintainers - Action Required

🔍 Before approving:

  1. Review all code changes carefully
  2. Check that no malicious code is present
  3. Verify no secrets would be exposed
  4. Confirm the contributor is trustworthy

✅ To approve (choose one method):

🎯 Quick approval via comment (recommended):

/approve

📝 Alternative comment formats:

  • /approve-testing
  • approved for testing
  • approve for testing

🏷️ Manual approval:

  • Add the approved-for-testing label

🧪 Test Status

✅ Running without approval:

  • Unit tests (no secrets)
  • Linting and code quality
  • Docker build validation
  • Performance benchmarks

🔒 Awaiting approval:

  • Integration tests (requires NETBIRD_API_TOKEN)
  • Docker Compose tests (requires NETBIRD_API_TOKEN)
  • Helm chart tests with real API

🔐 Security Note: Only maintainers with write access can approve. This protects repository secrets from malicious code.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

🧪 External PR Test Workflow Status

⚠️ Approval Required

This external PR requires approval to run tests with secrets.

Test Category Status Details
Basic Tests 🔄 Running Unit tests, linting, Docker build
Integration Tests 🔒 Requires Approval Add 'approved-for-testing' label or comment '/approve'
Docker Compose 🔒 Requires Approval Add 'approved-for-testing' label or comment '/approve'
Helm Chart 🔒 Requires Approval Add 'approved-for-testing' label or comment '/approve'

🔐 For Maintainers

To run the full test suite with secrets:
Option 1: Add the approved-for-testing label
Option 2: Comment one of these approval commands:

  • /approve
  • /approve-testing
  • approved for testing

Security Note: Only approve PRs from trusted contributors after thorough code review.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

✅ Basic Tests Complete

Test Category Status Details
Basic Tests ✅ SUCCESS Unit tests, linting, Docker build

🔒 Integration Tests Still Require Approval

For a maintainer to run tests that require secrets, please:

  • Add the approved-for-testing label, or
  • Comment with /approve

@matanbaruch
Copy link
Owner

/approved

@github-actions
Copy link
Contributor

✅ Approved via Comment

Approved by: @matanbaruch
Approved on: 2025-10-17 04:13:07 UTC
Trigger comment: "/approved"

This external PR has been approved for testing with secrets. The full test suite will run automatically.

Tests that will now run:

  • Integration tests with real NetBird API
  • Docker Compose tests
  • Helm chart tests with real secrets

Future commits to this PR will automatically run the full test suite without requiring re-approval.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a peer_user field to connection status metrics to track user associations with peers, using the user_id when available or "unknown" as a fallback. It also makes the API URL configurable in docker-compose.

  • Adds peer_user label to the netbird_peer_connection_status_by_name metric
  • Implements logic to populate the peer_user field with user_id or "unknown"
  • Makes NETBIRD_API_URL configurable with default fallback in docker-compose

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/exporters/peers.go Adds peer_user field to metrics with user_id handling
docker-compose.yml Makes API URL configurable with environment variable

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link
Contributor

✅ Basic Tests Complete

Test Category Status Details
Basic Tests ✅ SUCCESS Unit tests, linting, Docker build

@github-actions
Copy link
Contributor

🧪 External PR Test Workflow Status

Test Category Status Details
Basic Tests 🔄 Running Unit tests, linting, Docker build
Integration Tests 🔄 Running Tests with real NetBird API
Docker Compose 🔄 Running Full stack testing
Helm Chart 🔄 Running Kubernetes deployment testing

@github-actions
Copy link
Contributor

✅ Basic Tests Complete

Test Category Status Details
Basic Tests ✅ SUCCESS Unit tests, linting, Docker build

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.

2 participants