Skip to content

chore: adds org lookup type to instrumentation data#6816

Open
j-luong wants to merge 1 commit into
mainfrom
chore/cli-1372_addOrgLookupInstrumentationData
Open

chore: adds org lookup type to instrumentation data#6816
j-luong wants to merge 1 commit into
mainfrom
chore/cli-1372_addOrgLookupInstrumentationData

Conversation

@j-luong
Copy link
Copy Markdown
Contributor

@j-luong j-luong commented May 18, 2026

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Commit messages
    are release-note ready, emphasizing
    what was changed, not how.
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Highlights breaking API changes (if applicable)
  • Links to automated tests covering new functionality
  • Includes manual testing instructions (if necessary)
  • Updates relevant GitBook documentation (PR link: ___)
  • Includes product update to be announced in the next stable release notes

What does this PR do?

This PR adds some new instrumentation data to measure how we perform organisation lookups in GAF.

Where should the reviewer start?

How should this be manually tested?

What's the product update that needs to be communicated to CLI users?

N/A - internal change

Risk assessment (Low | Medium | High)?

Low - changes to instrumentation data

@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented May 18, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@j-luong j-luong marked this pull request as ready for review May 18, 2026 13:57
@j-luong j-luong requested review from a team as code owners May 18, 2026 13:57
@snyk-pr-review-bot

This comment has been minimized.

@j-luong j-luong force-pushed the chore/cli-1372_addOrgLookupInstrumentationData branch from efae219 to 5f89048 Compare May 18, 2026 19:02
@snyk-pr-review-bot

This comment has been minimized.

@j-luong j-luong force-pushed the chore/cli-1372_addOrgLookupInstrumentationData branch from 5f89048 to acf71a2 Compare May 19, 2026 09:42
@j-luong j-luong force-pushed the chore/cli-1372_addOrgLookupInstrumentationData branch from acf71a2 to 59fa70d Compare May 19, 2026 09:42
@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot
Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Delayed Debug Logging 🟡 [minor]

The writeLogHeader call has been moved after the globalEngine.Init() error check. If the engine fails to initialize, the function returns early, and the debug log header—which contains critical troubleshooting metadata such as the CLI Version, Platform, and API endpoint—will not be printed. This hinders the ability to diagnose boot-time failures where environment context is most needed.

if debugEnabled {
	writeLogHeader(globalConfiguration, networkAccess)
}
📚 Repository Context Analyzed

This review considered 8 relevant code sections from 5 files (average relevance: 0.79)

Comment thread cliv2/cmd/cliv2/main.go
globalLogger.Print("Failed to init Workflow Engine!", err)
return constants.SNYK_EXIT_CODE_ERROR
}
if debugEnabled {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

context: writeLogHeader will call config.GetString(configuration.ORGANIZATION) before analytics are initialised, so we move it to just after globalEngine.Init()

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