apm-agent-dotnet: Object Reference after updating 1.8.1 -> 1.9 (Elastic.Apm.Agent.Tracer is null)

APM Agent version

Elastic.Apm 1.9.

Environment

Windows .Net Framework 4.7.2

Describe the bug

It looks like Elastic.Apm.Agent.Tracer behavior changed in 1.9 (previously was 1.8.1) In DEBUG mode (local execution) we don’t Initialize APM. After updating the assembly Elastic.Apm.Agent.Tracer became null

For example, we have an Object reference

  1. Windows Service var transaction = Elastic.Apm.Agent.Tracer.StartTransaction(FullName, ApiConstants.TypeRequest);
  2. WebSite in APM SQL Interceptor image

It is not critical, I’ve fixed it all on our side. This Issue FYI only, feel free to close it.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 15 (5 by maintainers)

Commits related to this issue

Most upvoted comments

@iqmeta you got the same issue. Check your assembly bindings

      <dependentAssembly>
        <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
      </dependentAssembly>

But I’m not sure if it can be safely removed for your application.