-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Automatically capture and attach Visual Studio solution/project context to all telemetry. This enriches spans, metrics, and logs with valuable workspace information without manual instrumentation.
Context to Capture
Solution Context
vs.solution.name- Solution file namevs.solution.path- Full path (consider privacy)vs.solution.projects.count- Number of projectsvs.solution.guid- Solution GUID for correlation
Project Context (when applicable)
vs.project.name- Active/relevant project namevs.project.type- Project type GUID or friendly namevs.project.language- Primary language (C#, VB, F#, etc.)vs.project.framework- Target framework
IDE Context
vs.version- Visual Studio versionvs.edition- Community/Professional/Enterprisevs.theme- Current theme (Light/Dark/Blue)
Proposed API
// Enable in configuration
var config = new TelemetryConfiguration
{
IncludeVisualStudioContext = true, // Already exists
IncludeSolutionContext = true, // New
IncludeProjectContext = true, // New
SolutionContextRefreshInterval = TimeSpan.FromSeconds(30)
};
// Or manually refresh context
VsixTelemetry.RefreshWorkspaceContext();
// Access current context
var context = VsixTelemetry.WorkspaceContext;
Console.WriteLine(context.SolutionName);Implementation Notes
- Cache context and refresh periodically (solutions don't change often)
- Subscribe to solution/project events for updates
- Consider privacy: option to hash paths instead of full paths
- Handle "no solution open" gracefully
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request