-
Notifications
You must be signed in to change notification settings - Fork 6.1k
[New article] Add AmbientMetadata.Build documentation #51192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[New article] Add AmbientMetadata.Build documentation #51192
Conversation
There was a problem hiding this 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 comprehensive documentation for the Microsoft.Extensions.AmbientMetadata.Build component, which enables .NET applications to capture and access CI/CD build metadata at runtime.
Changes:
- Adds main documentation page explaining build metadata functionality, configuration options, and CI/CD integration
- Includes five code snippet examples demonstrating different usage patterns
- Updates TOC navigation to include the new build metadata documentation
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/navigate/tools-diagnostics/toc.yml | Adds navigation entry for the new build metadata documentation |
| docs/core/enrichment/build-metadata.md | Main documentation file covering installation, configuration, usage, and CI/CD integration |
| docs/core/enrichment/snippets/buildmetadata/* | Complete example showing build metadata setup and usage with logging |
| docs/core/enrichment/snippets/buildmetadata-logging/* | Example demonstrating logging integration with build metadata |
| docs/core/enrichment/snippets/buildmetadata-configure/* | Example showing two-step configuration approach |
| docs/core/enrichment/snippets/buildmetadata-configure-programmatic/* | Example of programmatic configuration |
| docs/core/enrichment/snippets/buildmetadata-access/* | Example of accessing build metadata via dependency injection |
2247c8f to
8a1ebbf
Compare
5a4d2ad to
148ab93
Compare
148ab93 to
5d31733
Compare
|
@gewarren please kindly review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
| @@ -0,0 +1,140 @@ | |||
| --- | |||
| title: Build ambient metadata | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| title: Build ambient metadata | |
| title: Ambient metadata about build |
I'm suggesting this wording so as to avoid possible confusion that the article is about building ambient metadata.
| ai-usage: ai-assisted | ||
| --- | ||
|
|
||
| # Build ambient metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Build ambient metadata | |
| # Ambient metadata about build |
|
|
||
| ### 2. Use AddBuildMetadata() methods | ||
|
|
||
| You can also configure build metadata using the `AddBuildMetadata()` extension methods. These methods do absolutely the same thing as `UseBuildMetadata()` above, but provide more flexibility if, for instance, you configure Host Configuration and Dependency Injection in different places of your source code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| You can also configure build metadata using the `AddBuildMetadata()` extension methods. These methods do absolutely the same thing as `UseBuildMetadata()` above, but provide more flexibility if, for instance, you configure Host Configuration and Dependency Injection in different places of your source code. | |
| You can also configure build metadata using the `AddBuildMetadata()` extension methods. These methods do the same thing as the `UseBuildMetadata()` method described previously, but provide more flexibility if, for instance, you configure Host Configuration and Dependency Injection in different places of your source code. |
| In the example above: | ||
|
|
||
| - We use `appsettings.json` to configure build metadata properties *manually*. This is for demonstration purposes; in a real CI/CD scenario, these values would be captured automatically from respective environment variables, and you don't need to have them in `appsettings.json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| In the example above: | |
| - We use `appsettings.json` to configure build metadata properties *manually*. This is for demonstration purposes; in a real CI/CD scenario, these values would be captured automatically from respective environment variables, and you don't need to have them in `appsettings.json`. | |
| > [!NOTE] | |
| > This example uses `appsettings.json` to configure build metadata properties *manually*. This is for demonstration purposes; in a real CI/CD scenario, these values would be captured automatically from respective environment variables, and you don't need to have them in `appsettings.json`. |
Summary
Provides documentation for a new component Microsoft.Extensions.AmbientMetadata.Build.
Internal previews