Skip to content

Commit e666a78

Browse files
committed
2 parents 248b375 + df7d9db commit e666a78

86 files changed

Lines changed: 848 additions & 282 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.azuredevops/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: 2
2+
3+
# Disabling dependabot on Azure DevOps as this is a mirrored repo. Updates should go through github.
4+
enable-campaigned-updates: false
5+
enable-security-updates: false

.config/tsaoptions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"instanceUrl": "https://devdiv.visualstudio.com/",
33
"template": "TFSDEVDIV",
44
"projectName": "DEVDIV",
5-
"areaPath": "DevDiv\\VS Diagnostics\\Production Diagnostics\\Dotnet Monitor",
5+
"areaPath": "DevDiv\\VS Diagnostics\\Production Diagnostics",
66
"iterationPath": "DevDiv",
77
"notificationAliases": [ "dotnetmonitorsdl@microsoft.com" ],
88
"repositoryName": "dotnet-dotnet-monitor",

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@
55
/eng/
66
global.json
77
/eng/dependabot @dotnet/dotnet-monitor
8-
/eng/actions @dotnet/dotnet-monitor

.github/copilot-instructions.md

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# dotnet-monitor Repository - Copilot Instructions
2+
3+
## Project Overview
4+
5+
`dotnet-monitor` is a diagnostic tool for capturing diagnostic artifacts from .NET applications in an operator-driven or automated manner. It provides a unified HTTP API for collecting diagnostics regardless of where the application runs (local, Docker, Kubernetes).
6+
7+
**Key Features:**
8+
- HTTP API for on-demand collection of diagnostic artifacts (dumps, traces, logs, metrics)
9+
- Collection Rules for automated, rule-based artifact collection based on triggers
10+
- Egress providers for storing artifacts in various destinations
11+
- Cross-platform support (Windows, Linux, macOS)
12+
13+
## Technology Stack
14+
15+
- **Primary Language:** C#
16+
- **.NET SDK:** 10.0
17+
- **Target Frameworks:** .NET 8.0, 9.0, 10.0
18+
- **ASP.NET Core:** Multi-version support (8.0, 9.0, 10.0)
19+
- **Build System:** MSBuild with .NET Arcade SDK
20+
- **Native Code:** C++ (for profilers and native components)
21+
- **Testing:** xUnit
22+
- **Documentation:** Markdown
23+
- **Package Management:** NuGet with Central Package Management
24+
25+
## Repository Structure
26+
27+
- **`src/Tools/dotnet-monitor/`** - Main dotnet-monitor tool
28+
- **`src/Microsoft.Diagnostics.Monitoring.WebApi/`** - Core Web API implementation
29+
- **`src/Microsoft.Diagnostics.Monitoring.Options/`** - Configuration options
30+
- **`src/Microsoft.Diagnostics.Monitoring.StartupHook/`** - Startup hook for in-process features
31+
- **`src/Extensions/`** - Extension implementations (Azure Blob, S3 storage, etc.)
32+
- **`src/Profilers/`** - Native profiler implementations
33+
- **`src/Tests/`** - All test projects
34+
- **`documentation/`** - User-facing documentation
35+
- **`eng/`** - Build and engineering infrastructure
36+
37+
## Build and Test Commands
38+
39+
### Build
40+
```bash
41+
# Windows
42+
.\Build.cmd
43+
44+
# Linux/macOS
45+
./build.sh
46+
```
47+
48+
### Test
49+
```bash
50+
# Windows
51+
.\Test.cmd
52+
53+
# Linux/macOS
54+
./test.sh
55+
```
56+
57+
### Restore Dependencies
58+
```bash
59+
# Windows
60+
.\Restore.cmd
61+
62+
# Linux/macOS
63+
./restore.sh
64+
```
65+
66+
## Coding Guidelines
67+
68+
### C# Code Style
69+
70+
1. **File Headers:** All C# files must include the .NET Foundation license header:
71+
```csharp
72+
// Licensed to the .NET Foundation under one or more agreements.
73+
// The .NET Foundation licenses this file to you under the MIT license.
74+
```
75+
76+
2. **Language Version:** Use `Latest` C# language features
77+
78+
3. **Code Style Preferences:**
79+
- Do NOT use `var` - use explicit types
80+
- Prefer explicit types for locals, parameters, and member access
81+
- Use `this.` qualification: NO (avoid using `this.` unless necessary)
82+
- Expression-bodied members: Use for properties, accessors, indexers, lambdas
83+
- Expression-bodied members: DO NOT use for methods, constructors, operators
84+
- Pattern matching: Prefer pattern matching over `as` with null checks
85+
- Null-checking: Use null-conditional operators and null-coalescing
86+
- Using directives: Place outside namespace
87+
- Namespace style: Use block-scoped namespaces (not file-scoped)
88+
- Braces: Always use braces even for single-line blocks
89+
90+
4. **Modifier Order:**
91+
```
92+
public, private, protected, internal, static, extern, new, virtual,
93+
abstract, sealed, override, readonly, unsafe, volatile, async
94+
```
95+
96+
5. **Documentation:** Generate XML documentation files for all projects
97+
98+
6. **Warnings:** Treat all warnings as errors (`TreatWarningsAsErrors=true`)
99+
100+
7. **Code Style Enforcement:** Code style rules are enforced during build (`EnforceCodeStyleInBuild=true`)
101+
102+
### Formatting
103+
104+
- **Indentation:** 4 spaces (2 spaces for XML/YAML/JSON config files)
105+
- **Line Endings:** Insert final newline
106+
- **Trailing Whitespace:** Trim trailing whitespace
107+
- **C++ Code:** Use Allman brace style
108+
109+
### Testing
110+
111+
- All test projects are in `src/Tests/`
112+
- Use xUnit for unit tests
113+
- Test project naming: `<Component>.UnitTests` or `<Component>.IntegrationTests`
114+
- Always add tests when adding new features
115+
- Start with a failing test when fixing bugs
116+
117+
## Security Considerations
118+
119+
1. **Authentication:** dotnet-monitor supports API Key authentication (recommended) and Windows authentication
120+
2. **Sensitive Data:** Never commit secrets or API keys to source code
121+
3. **Security Documentation:** See `documentation/security-considerations.md` for security topics
122+
123+
## Pull Request Process
124+
125+
1. Create an issue for non-trivial changes
126+
2. Fork the repository and create a feature branch from `main`
127+
3. Make focused, minimal changes
128+
4. Add tests for new features or bug fixes
129+
5. Ensure builds are clean and all tests pass
130+
6. Sign the .NET Foundation CLA (automated on first PR)
131+
7. Wait for review from Microsoft team members
132+
8. Address feedback and iterate
133+
134+
## Key Configuration Files
135+
136+
- **`Directory.Build.props`** - Common MSBuild properties for all projects
137+
- **`Directory.Packages.props`** - Central package version management
138+
- **`.editorconfig`** - Code style and formatting rules
139+
- **`global.json`** - .NET SDK version pinning
140+
- **`NuGet.config`** - NuGet feed configuration
141+
142+
## Common Patterns
143+
144+
1. **Options Pattern:** Use strongly-typed options classes in `Microsoft.Diagnostics.Monitoring.Options`
145+
2. **Collection Rules:** Implement triggers and actions following existing patterns
146+
3. **Egress Providers:** Extend `IEgressProvider` for new storage backends
147+
4. **API Endpoints:** Follow RESTful conventions in `Microsoft.Diagnostics.Monitoring.WebApi`
148+
5. **Configuration:** Use IConfiguration with JSON/environment variable support
149+
6. **Learning Paths:** Guidance for developers on the various components in `dotnet-monitor`. It may need to be updated based on product changes.
150+
151+
## Documentation
152+
153+
- User documentation in `documentation/` directory
154+
- API documentation at `documentation/api/`
155+
- Configuration schema: `documentation/schema.json`
156+
- Keep documentation synchronized with code changes
157+
- Follow existing markdown structure and formatting
158+
159+
## Useful Links
160+
161+
- [Contributing Guidelines](CONTRIBUTING.md)
162+
- [Building Instructions](documentation/building.md)
163+
- [Security Policy](SECURITY.md)
164+
- [API Documentation](documentation/api/README.md)
165+
- [Configuration Guide](documentation/configuration/README.md)

.github/dependabot.template.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#! to the list of TFMs that the major version uses for build and test.
99
#@ def getTfms():
1010
#@ return {
11+
#@ "10": [ "net10.0", "net9.0", "net8.0" ],
1112
#@ "9": [ "net9.0", "net8.0" ],
1213
#@ "8": [ "net8.0" ],
1314
#@ }
@@ -17,7 +18,8 @@
1718
#! target branch and which major version of .NET Monitor it builds.
1819
#@ def getBranches():
1920
#@ return [
20-
#@ struct.encode({"name": "main", "majorVersion": "9"}),
21+
#@ struct.encode({"name": "main", "majorVersion": "10"}),
22+
#@ struct.encode({"name": "release/10.0", "majorVersion": "10"}),
2123
#@ struct.encode({"name": "release/9.0", "majorVersion": "9"}),
2224
#@ struct.encode({"name": "release/8.x", "majorVersion": "8"}),
2325
#@ ]

.github/dependabot.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,23 @@ updates:
3434
target-branch: main
3535
commit-message:
3636
prefix: '[main] '
37+
- package-ecosystem: nuget
38+
directory: /eng/dependabot/net10.0
39+
schedule:
40+
interval: daily
41+
target-branch: main
42+
ignore:
43+
- dependency-name: '*'
44+
update-types:
45+
- version-update:semver-major
46+
commit-message:
47+
prefix: '[main] '
48+
groups:
49+
runtime-dependencies:
50+
patterns:
51+
- Microsoft.Extensions.*
52+
- Microsoft.NETCore.DotNetHost
53+
- System.Text.Json
3754
- package-ecosystem: nuget
3855
directory: /eng/dependabot/net9.0
3956
schedule:
@@ -68,6 +85,86 @@ updates:
6885
- Microsoft.Extensions.*
6986
- Microsoft.NETCore.DotNetHost
7087
- System.Text.Json
88+
- package-ecosystem: nuget
89+
directory: /eng/dependabot/independent
90+
schedule:
91+
interval: daily
92+
target-branch: release/10.0
93+
ignore:
94+
- dependency-name: Microsoft.Extensions.*
95+
update-types:
96+
- version-update:semver-major
97+
- dependency-name: Moq
98+
commit-message:
99+
prefix: '[release/10.0] '
100+
groups:
101+
azure-sdk-dependencies:
102+
patterns:
103+
- Azure.Core
104+
- Azure.Identity
105+
- Azure.Storage.*
106+
identity-dependencies:
107+
patterns:
108+
- Microsoft.Identity.*
109+
- Microsoft.IdentityModel.*
110+
- package-ecosystem: nuget
111+
directory: /eng/dependabot/nuget.org
112+
schedule:
113+
interval: daily
114+
target-branch: release/10.0
115+
commit-message:
116+
prefix: '[release/10.0] '
117+
- package-ecosystem: nuget
118+
directory: /eng/dependabot/net10.0
119+
schedule:
120+
interval: daily
121+
target-branch: release/10.0
122+
ignore:
123+
- dependency-name: '*'
124+
update-types:
125+
- version-update:semver-major
126+
commit-message:
127+
prefix: '[release/10.0] '
128+
groups:
129+
runtime-dependencies:
130+
patterns:
131+
- Microsoft.Extensions.*
132+
- Microsoft.NETCore.DotNetHost
133+
- System.Text.Json
134+
- package-ecosystem: nuget
135+
directory: /eng/dependabot/net9.0
136+
schedule:
137+
interval: daily
138+
target-branch: release/10.0
139+
ignore:
140+
- dependency-name: '*'
141+
update-types:
142+
- version-update:semver-major
143+
commit-message:
144+
prefix: '[release/10.0] '
145+
groups:
146+
runtime-dependencies:
147+
patterns:
148+
- Microsoft.Extensions.*
149+
- Microsoft.NETCore.DotNetHost
150+
- System.Text.Json
151+
- package-ecosystem: nuget
152+
directory: /eng/dependabot/net8.0
153+
schedule:
154+
interval: daily
155+
target-branch: release/10.0
156+
ignore:
157+
- dependency-name: '*'
158+
update-types:
159+
- version-update:semver-major
160+
commit-message:
161+
prefix: '[release/10.0] '
162+
groups:
163+
runtime-dependencies:
164+
patterns:
165+
- Microsoft.Extensions.*
166+
- Microsoft.NETCore.DotNetHost
167+
- System.Text.Json
71168
- package-ecosystem: nuget
72169
directory: /eng/dependabot/independent
73170
schedule:

.github/learning-path-sha.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
de9b2ea7b9423029f655819447ff9a5c7e4e7f96
1+
bf600abc1ab92d3c976a924bbe1a1f00eccf006c

.github/releases.json

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,17 @@
44
"cleanupUnsupportedReleasesAfterMonths": 12
55
},
66
"preview": [
7-
"10.0",
87
"9.1"
98
],
109
"supported": [
10+
"10.0",
1111
"9.0",
1212
"8.1"
1313
],
1414
"unsupported": [
15-
"8.0",
16-
"6.3"
15+
"8.0"
1716
],
1817
"releases": {
19-
"6.3": {
20-
"tag": "v6.3.10",
21-
"minorReleaseDate": "2022-10-11T00:00:00.000Z",
22-
"patchReleaseDate": "2024-11-12T00:00:00.000Z",
23-
"supportedFrameworks": [
24-
"net6.0",
25-
"netcoreapp3.1"
26-
],
27-
"outOfSupportDate": "2024-11-12T00:00:00.000Z"
28-
},
2918
"8.0": {
3019
"tag": "v8.0.8",
3120
"minorReleaseDate": "2023-11-14T00:00:00.000Z",
@@ -36,9 +25,9 @@
3625
"outOfSupportDate": "2025-05-11T00:00:00.000Z"
3726
},
3827
"9.0": {
39-
"tag": "v9.0.4",
28+
"tag": "v9.0.5",
4029
"minorReleaseDate": "2024-11-12T00:00:00.000Z",
41-
"patchReleaseDate": "2025-08-06T00:00:00.000Z",
30+
"patchReleaseDate": "2025-11-11T00:00:00.000Z",
4231
"supportedFrameworks": [
4332
"net9.0"
4433
]
@@ -60,9 +49,9 @@
6049
]
6150
},
6251
"10.0": {
63-
"tag": "v10.0.0-rc.2.25503.6",
64-
"minorReleaseDate": "2025-10-14T00:00:00.000Z",
65-
"patchReleaseDate": "2025-10-14T00:00:00.000Z",
52+
"tag": "v10.0.0",
53+
"minorReleaseDate": "2025-11-12T00:00:00.000Z",
54+
"patchReleaseDate": "2025-11-12T00:00:00.000Z",
6655
"supportedFrameworks": [
6756
"net10.0"
6857
]

.github/workflows/check-learning-path-links.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checkout head
20-
uses: actions/checkout@v5
20+
uses: actions/checkout@v6.0.2
2121
with:
2222
persist-credentials: true # need this for opening a PR
2323
fetch-depth: 0
@@ -30,7 +30,7 @@ jobs:
3030
echo "prev_sha=$prev_sha" >> $GITHUB_ENV
3131
3232
- name: Checkout previous update
33-
uses: actions/checkout@v5
33+
uses: actions/checkout@v6.0.2
3434
with:
3535
persist-credentials: false
3636
ref: ${{ env.prev_sha }}

0 commit comments

Comments
 (0)