dotnet / tye

Tye is a tool that makes developing, testing, and deploying microservices and distributed applications easier. Project Tye includes a local orchestrator to make developing microservices easier and the ability to deploy microservices to Kubernetes with minimal configuration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object reference not set to an instance of an object on EventCounters for .NET 7

slaterx opened this issue · comments

Describe the bug

We upgraded our code to .NET 7 and tye now prints these errors on log:

To Reproduce

  1. tye run
  2. See the output on Microservice's log:
[13:42:22 ERR] Error processing counter for Microsoft.AspNetCore.Hosting:EventCounters
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Tye.Hosting.Diagnostics.MetricSink.<>c__DisplayClass2_0.<Attach>b__0(TraceEvent traceEvent) in /_/src/Microsoft.Tye.Hosting.Diagnostics/MetricSink.cs:line 45

Further technical details

  • tye --version
    0.11.0-alpha.22111.1+3edef5428949c518c078844d6438e5ba86fce600

  • The platform (Linux/macOS/Windows)
    Reproducible on all platforms.

hey @slaterx,

Are you using a dotnet new project? Something like the sample weather controller api app.

.

No, this is an existing project started on .NET 6 and migrated off to .NET 7

@Phiph I tested with dotnet new, creating the sample weather controller api, and the result was the same.