@@ -3,14 +3,12 @@ using System.Web;
 using System.Web.Http;
 using System.Web.Mvc;
 using System.Web.Routing;
-using OpenTelemetry.Trace;
 using OpenTelemetry.Trace.Configuration;
 
 namespace OpenTelemetry.Exporter.AspNet
 {
     public class WebApiApplication : HttpApplication
     {
-        private TracerFactory tracerFactory;
         private IDisposable openTelemetry;
 
         protected void Application_Start()
﻿using System;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;
using OpenTelemetry.Trace;
using OpenTelemetry.Trace.Configuration;

namespace OpenTelemetry.Exporter.AspNet
{
    public class WebApiApplication : HttpApplication
    {
        private TracerFactory tracerFactory;
        private IDisposable openTelemetry;

        protected void Application_Start()
        {
            this.openTelemetry = OpenTelemetrySdk.Default.EnableOpenTelemetry(
                (builder) => builder.AddDependencyInstrumentation()
                .AddRequestInstrumentation()
                .UseJaegerActivityExporter(c =>
                {
                    c.AgentHost = "localhost";
                    c.AgentPort = 6831;
                }));

            GlobalConfiguration.Configure(WebApiConfig.Register);

            AreaRegistration.RegisterAllAreas();
            RouteConfig.RegisterRoutes(RouteTable.Routes);
        }

        protected void Application_End()
        {
            this.tracerFactory?.Dispose();
            this.openTelemetry?.Dispose();
        }
    }
}

please try to avoid unrelated changes. While this is good change, its not related to adding net452, so it's best to do separately.