question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
insanity13commented, Apr 20, 2021

@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.

0reactions
insanity13commented, May 28, 2021

I apologize for not respond as I promised. I was unable to determine the update dependency on the error. Agree you can close this Issue, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Agent.Tracer.CaptureException throws ...
NullReferenceException : Object reference not set to an instance of an object. at Elastic.Apm.BackendComm.BackendCommComponentBase.
Read more >
Java Agent version 1.x
If APM server version is <6.7 or 7.0+, this should have no effect. Otherwise, upgrade the Java agent to 1.9.0+. ApacheHttpAsyncClientInstrumentation matching ...
Read more >
Public API | APM .NET Agent Reference [1.x]
The public API of the Elastic APM .NET agent lets you customize and manually create spans and transactions, as well as track errors....
Read more >
Object reference not set to an instance of an object - APM
Hi, I am trying to have a semi-dynamic agent on a .net stack. It worked on previous version, but now I get an....
Read more >
Manual log correlation | APM .NET Agent Reference [1.x]
Given a transaction object, you can obtain its trace id by using the Transaction.TraceId property and its transaction id by using the Transaction.Id...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found