DataDog / dd-trace-js

JavaScript APM Tracer
https://docs.datadoghq.com/tracing/
Other
639 stars 303 forks source link

http module configuration breaks server APM reporting #2225

Closed clement-heliot closed 8 months ago

clement-heliot commented 2 years ago

:wave: I have a case where configuring the http module breaks the APM reporting of the server. The service http-client is still being reported correctly.

Expected behaviour I would expect configuring the http module this way would not break the APM server reporting.

Actual behaviour APM server reporting is broken and stop reporting.

Steps to reproduce

tracer.use('http', {
    server: {
      blocklist: ['/ping'],
    },
    client: {
      blocklist: [
        'https://back.sqreen.io/sqreen/v1/app-beat',
        'https://ingestion.sqreen.com/batches',
        'https://events.launchdarkly.com/bulk',
      ],
    },
  })

Environment

rochdev commented 2 years ago

When you say "stop reporting" do you mean that you're no longer getting traces at all, only when you use a blocklist configuration?

clement-heliot commented 2 years ago

@rochdev Yep, the APM Service page stopped being updated. Say the service name was saturne, saturne APM page wasn't receiving anything. However saturne-http-client was working as expected. When I rolled back the changes and removed the configuration, saturne APM page worked again.

rochdev commented 2 years ago

Is this something you are able to easily isolate in a reproduction snippet? Also, was there anything else in that change, for example changing the version of dd-trace?

clement-heliot commented 2 years ago

@rochdev Nope, basically I changed

tracer.use('http', { blocklist: ['/ping'] })

to

tracer.use('http', {
    server: {
      blocklist: ['/ping'],
    },
    client: {
      blocklist: [
        'https://back.sqreen.io/sqreen/v1/app-beat',
        'https://ingestion.sqreen.com/batches',
        'https://events.launchdarkly.com/bulk',
      ],
    },
  })

Only those changes were made, no dd-trace version change were involved.

tlhunter commented 9 months ago

@clement-heliot can you confirm if you're still facing this issue with a current tracer version?

tlhunter commented 8 months ago

I'll close this for now but we can reopen it if it's still an issue.