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.

Automatic instrumentation fails after setup

See original GitHub issue

Describe the bug After setting up .NET tracing using DataDog documentation web application starts logging errors non-stop. Error example: [2018-09-18 14:25:41] [Error] An error occured while sending traces to the agent at http://localhost:8126/v0.3/traces System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at Datadog.Trace.Agent.Api.<SendAsync>d__81.MoveNext()`

And at the same time there is an error on trace-agent side: 2018-09-19 08:11:26 ERROR (receiver.go:386) - cannot decode v0.3 traces payload: msgp: attempted to decode type "nil" with method for "str"

Attempts to turn off automatic instrumentation do not work (there is no clear documentation on how to turn it off):

  1. Set apm_config:enabled: false
  2. Turn off trace agent
  3. Do iis_reset
  4. Redeploy the application

To Reproduce Steps to reproduce the behavior:

  1. Follow the documentation available at official website.
  2. Find yourself in a quite of a pickle.

Expected behavior Application does not throw exceptions after being set up.

Runtime environment (please complete the following information):

  • Instrumentation mode: automatic
  • Tracer version: 0.3.0
  • OS: Windows Server 2012 R2
  • CLR: .NET Framework 4.5.1

Additional context Our application includes MsgPack library. Maybe it conflicts with the one used in the injected CLR code Data Dog is using.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dd-calebcommented, Sep 19, 2018

It looks like the agent is more restrictive in the format its allowed to receive than what the tracer is producing. I think we can add code to where the tracer sends spans to remove nil strings or set them to the empty string.

To disable automatic instrumentation you have to remove an environment variable. (SET COR_ENABLE_PROFILING=0) We should document this, but we should also provide a way to configure this through the apm section of the datadog agent config yaml. We should also limit the amount we log on errors, since the trace agent being down is entirely possible under normal usage.

@vasiliy0 besides the noise in the logs, did this break the application? Or did IIS continue to work properly?

0reactions
lucaspimentelcommented, Sep 24, 2018

@vasiliy0: We released 0.3.1-beta which should fix these errors. Thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Application Insights auto-instrumentation
Auto-instrumentation fails when .NET and .NET Core apps were already instrumented with the SDK. Remove the Application Insights SDK if you want ...
Read more >
Auto instrument not working - Cisco AppDynamics Community
Hi All, Currently, I try to implement cluster-operator and cluster-agent on K8s. the cluster metric shows under the "Server/Cluster" menu.
Read more >
sveltekit auto-instrumentation problem with satisfies #8225
Workaround: disabling the auto instrumentation fixes it. sentrySvelteKit({ autoInstrument: false }) ...
Read more >
Automatic Instrumentation
After you have automatic instrumentation configured for your app or service, you might want to annotate selected methods or add manual instrumentation to ......
Read more >
Java OpenTelemetry auto-instrumentation
OpenTelemetry Instrumentation for Java automatically detects when one of the popular libraries is being used in the service and injects the ...
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