Skip to content

Only sends first batch of events to Elastic Agent on Deno #4604

@svenemtell

Description

@svenemtell

I guess Deno is not a supported platform but...
When running apm-agent-nodejs (4.13.0) in Deno (2.3.1) I only get the transactions sent the first 10 seconds.
When running apm-agent-nodejs in Node.js it works as expected.

Here is some meta code.

Before starting Deno I set (among others):
export ELASTIC_APM_LOG_LEVEL=trace

At the top of the file:
import apm from "elastic-apm-node/start.js";

I make a number of transactions in a loop as a test.

loop
    const trans = apm.startTransaction
    trans.addLabels
    trans.end

Unfortunately I cannot get the full logs, but here is the essence of the trace messages in Node.js and Deno where you can see the differences.

Node.js

_write: encode object
gzipStream "finish"
start intakeResTimer
gzipStream "end"
completePart gzipStream
intakeReq "finish"
completePart intakeReq
intakeReq "response"
intakeRes "end"
completePart intakeRes
timeline...

intake request start
_write: encode object
intakeReq "socket": unref it

Deno

_write: encode object
gzipStream "finish"
start intakeResTimer
gzipStream "end"
completePart gzipStream
intakeReq "response"
intakeRes "end"
completePart intakeRes

As you can see the intakeReq "finish", completePart intakeReq, the timeline and the three last traces where the socket is unrefed are missing when running in Deno.

Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions