Skip to main content

Posts

Sending GitHub Copilot telemetry to Application Insights

In a previous post I showed how to send the GitHub Copilot OpenTelemetry data to the Aspire Dashboard. Great for "what just happened on my machine?", but the data is gone when the container stops. And nobody else on the team can see it. So, the question becomes: how do we get the same data into Application Insights? There are two possible routes we can try: through an OpenTelemetry Collector, or directly to the OTLP endpoint of Application Insights. In this post we focus on the OpenTelemetry Collector. This is probably the easiest one and the one you’ll find in the documentation . We’ll put an OpenTelemetry Collector between Copilot Chat and Application Insights: VS Code Copilot Chat │ OTLP/HTTP ▼ OpenTelemetry Collector │ Azure Monitor exporter ▼ Application Insights The collector receives standard OpenTelemetry data and forwards it using the Application Insights connection string. Create an Application Insights resource Creat...
Recent posts

Release annotations in Application Insights

You're looking at a failures chart in Application Insights. Exceptions go from nothing to a wall of red at 14:32. The first question is always the same: did someone deploy something? Release annotations answer that question on the chart itself. They put a marker on the timeline for every deployment, so you no longer have to cross-check with the pipeline history. What is a release annotation? A release annotation is a marker on your Application Insights charts that flags a deployment or another significant event. When you select it, you see details like who requested the release, the branch, the pipeline and the environment. You can see them in: Performance and Failures Usage Workbooks (any time-series visualization) Remark: Annotations are not available in the Metrics pane. If you're looking for them there, you won't find them. Option 1: let Azure Pipelines do it If you deploy from Azure Pipelines with one of the standard Azure tasks, you don...

The fight your team is avoiding is the one that will define it

Last year, I joined a new team. After a few weeks I noticed that disagreements rarely made it into the room. Someone raises a concern, it gets a polite silence, and the conversation moves on. Everything stays friendly, and it was not clear to me that anything was actually getting settled. Coming from a team where we had a lot of discussions, openly and freely, this felt strange to me. Could this be a healthy team? Nobody was fighting... The feeling stayed with me until I listened to Coaching for Leaders, episode 802 , where Priya Parker talks about how leaders can turn conflict into progress. One message stuck with me: You don't become a durable team without a fight. That aligned perfectly with the feeling I had. The assumption behind our discomfort Parker points to a belief many of us carry, often without realizing it: "good" people and "good" groups don't fight. Somewhere there is an imaginary healthy team that never has these problem...

Delay new NuGet package versions with minimum package publish age

Most supply chain attacks on package ecosystems follow the same pattern: a malicious version gets published, and people pick it up within hours because their tooling always grabs the latest version. The window between "published" and "discovered and removed" is where the damage happens. NuGet now has an opt-in feature that targets exactly that window: minimum package publish age . Note: this feature requires NuGet 8.0, .NET SDK 11.0.100 or Visual Studio 18.12. What does it do? You configure a waiting period per package source. When dotnet package add or dotnet package update needs to pick the latest version for you, it skips versions that are younger than that period. That gives the community (and the package owner) time to spot a bad release before you adopt it. Because the age is set per source, you can delay packages from nuget.org without slowing down packages from your internal feed. Remark: the delay doesn't guarantee a package is safe. It ...

Bending Aspire to your will - Build a custom resource (Part 2)

In the previous part I defined ScalarResource and the OpenApiAnnotation , and services can opt in with WithOpenApi() . All data, no behaviour. Now I make Scalar actually start, find the documents, and tell the dashboard what it found. Note: this post is part of a series about the demos from my session “Bending Aspire to your will” . AddScalar: the behaviour lives in the extension method public static IResourceBuilder<ScalarResource> AddScalar( this IDistributedApplicationBuilder builder, string name = "scalar", int? port = null) { ArgumentNullException.ThrowIfNull(builder); var existing = builder.Resources.OfType<ScalarResource>().SingleOrDefault(); if (existing is not null) { return builder.CreateResourceBuilder(existing); } builder.Services.TryAddEventingSubscriber<ScalarEndpointLogger>(); var scalar = new ScalarResource(name); return builder.AddResource(scalar) .WithImage("scalara...

Bending Aspire to your will - Build a custom resource (Part 1)

I spend a lot of time testing and debugging APIs, and so do my AI agents. Lately I notice that my agents lose time and tokens on it. They look for the right port, guess at endpoints, fight with a terminal, and try to get the database back into a known state. Every run starts with the same detective work. So for this series of posts I picked one scenario and I’m sticking with it: the API-testing loop . The goal is to adapt Aspire so that I (and my agents) can debug and test easily and efficiently. Note: this post is part of a series about the demos from my session “Bending Aspire to your will” . Every API in my AppHost has its own OpenAPI document, and every API can have its own UI. I want one API reference for the whole graph. Scalar runs as a container, so it fits in Aspire as a resource. The question is how you build a custom resource that feels like it belongs there. The naive way is a Scalar container with a hand-written list of API URLs. It works, but it is one more list...

Bending Aspire to your will - Reset your application state with one command

I spend a lot of time testing and debugging APIs, and so do my AI agents. Lately I notice that my agents lose time and tokens on it. They look for the right port, guess at endpoints, fight with a terminal, and try to get the database back into a known state. Every run starts with the same detective work. So for this series of posts I picked one scenario and I’m sticking with it: the API-testing loop . The goal is to adapt Aspire so that I (and my agents) can debug and test easily and efficiently. The third step of my API-testing loop: tests leave data behind. A clean, repeatable run means flushing Redis and recreating the catalog database. By hand, that is a Redis CLI command and a database drop-and-seed, in the right order. For me that's annoying. For an agent, it's one more thing to figure out on every run. Note: this post is part of a series about the demos from my session “Bending Aspire to your will” . In aspire-shop , state lives in two places: the PostgreSQL cat...