Upgrading From Phobos 2.x To Phobos 2.3 And Up
For current Phobos 2.x customers who wish to upgrade to Phobos 2.3 and up.
OpenTelemetry NuGet Package Versions
Below is the required NuGet package versions to be used with Phobos 2.3 and up.
Package | Version |
---|---|
OpenTelemetry |
1.6.0 |
OpenTelemetry.Extensions.Hosting |
1.6.0 |
Below is the recommended NuGet package versions to be used with Phobos 2.3 and up.
Package | Version |
---|---|
OpenTelemetry.Exporter.InMemory |
1.6.0 |
OpenTelemetry.Exporter.OpenTelemetryProtocol |
1.6.0 |
OpenTelemetry.Exporter.Prometheus.AspNetCore |
1.6.0-rc.1 |
OpenTelemetry.Exporter.Zipkin |
1.6.0 |
OpenTelemetry.Instrumentation.AspNetCore |
1.5.1-beta.1 |
OpenTelemetry.Instrumentation.Http |
1.5.1-beta.1 |
OpenTelemetry.Instrumentation.SqlClient |
1.5.1-beta.1 |
OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore |
1.0.0-beta1 |
Phobos.Hosting Integration
There are some API changes introduced in the latest release of OpenTelemetry.Extensions.Hosting
:
IServiceCollection.AddOpenTelemetryTracing()
AddOpenTelemetryTracing()
API has been changed, rewrite your code to follow this pattern instead:services.AddOpenTelemetry() .WithTracing(builder => { // Move the configuration codes previously located // in AddOpenTelemetryTracing(builder => ...) here });
IServiceCollection.AddOpenTelemetryMetrics()
AddOpenTelemetryMetrics()
API has been changed, rewrite your code to follow this pattern instead:services.AddOpenTelemetry() .WithMetrics(builder => { // Move the configuration codes previously located // in AddOpenTelemetryMetrics(builder => ...) here });
If you use both tracing and metrics, the two changes above can be merged into one:
services.AddOpenTelemetry()
.WithTracing(builder => {
// Move the configuration codes previously located
// in AddOpenTelemetryTracing(builder => ...) here
})
.WithMetrics(builder => {
// Move the configuration codes previously located
// in AddOpenTelemetryMetrics(builder => ...) here
});