newrelic / newrelic-java-kotlin-coroutines

Provides instrumentation for Kotlin Coroutines
Apache License 2.0
1 stars 4 forks source link

ignores.suspend not filtering UndispatchedCoroutine #16

Closed anderssv closed 6 months ago

anderssv commented 1 year ago

I am not absolutely this should work, but it seems I can't ignore suspend traces for example for Custom/WrappedSuspend/UndispatchedCoroutine .

I have added the following to newrelic.yml:

  Coroutines:
    ignores:
      continuations: jetty-call-handler
      suspends: UndispatchedCoroutine,jetty-call-handler
      dispatched: io.ktor.utils.io.jvm.javaio.OutputAdapter$loop$1$loop$1,io.ktor.utils.io.ByteBufferChannel$writeSuspend$1

The filtering on dispatched works, but for suspends it does not seem to work. Am I on the right track here?

dhilpipre commented 1 year ago

It looks like you are on the right track but I think it may be expecting the full qualified classname to work. Can you try kotlinx.coroutines.UndispatchedCoroutine instead of UndispatchedCoroutine.

Let me know if that works or not. If not then we will try to find a fix

anderssv commented 1 year ago

Hi @dhilpipre , thanks for the feedback. But it doesn't seem to work.

This is my current suspends config: suspends: kotlinx.coroutines.UndispatchedCoroutine,jetty-call-handler

But the following query in NR still returns a continuous volume of Custom/WrappedSuspend/UndispatchedCoroutine:

SELECT rate(count(newrelic.timeslice.value), 1 MINUTE) as rate FROM Metric WHERE metricTimesliceName Like 'Custom/WrappedSuspend/%' AND appName='myapp' TIMESERIES SINCE 30 minutes AGO FACET metricTimesliceName

anderssv commented 1 year ago

Oh yeah. Custom/WrappedSuspend/jetty-call-handler is also not ignored. Continuations and dispatched is working.

dhilpipre commented 1 year ago

Thanks. We will take a look and see if we can get it to work properly. I will keep you posted and if we fix it there will be a new release with the fix.

dhilpipre commented 1 year ago

BTW, if you have a code sample that reproduces the problem that would be helpful

dhilpipre commented 6 months ago

Fixed in current release