-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error thrown when using @elastic/ecs-pino-format
v1.4.0
#3774
Labels
agent-nodejs
Make available for APM Agents project planning.
community
impact:high
Short-term priority; add to current release, or definitely next.
Comments
trentm
added a commit
that referenced
this issue
Dec 5, 2023
@gilmoreorless Thanks for the excellent bug report. This is my bad. We'll get a release out soon (hopefully today) to fix this. |
For others, or to possibly help searching symptoms, the failure looks something like this:
|
Thanks for the speedy resolution! |
PeterEinberger
pushed a commit
to fpm-git/apm-agent-nodejs
that referenced
this issue
Aug 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
agent-nodejs
Make available for APM Agents project planning.
community
impact:high
Short-term priority; add to current release, or definitely next.
Describe the bug
Background context:
@elastic/ecs-pino-format
from1.4.0
to1.5.0
.1.5.0
added a new namedecsFormat
export as the preferred API.elastic-apm-node
v4.2.0
(but wasn't mentioned in the changelog).The problem:
package-lock.json
but leftpackage.json
alone, so it still publishes a dependency on"@elastic/ecs-pino-format": "^1.4.0"
[email protected]
but still use@elastic/[email protected]
, especially when package lockfiles are taken into account.const { ecsFormat } = require('@elastic/ecs-pino-format')
returnsundefined
, then later throwsTypeError: ecsFormat is not a function
To Reproduce
Presumably, running
npm install @elastic/[email protected]
in this repo then running the tests should show the error.I can't tell for certain because trying to run this repo's tests on my M2 mac failed to pull some Docker images.
Expected behavior
Changing the
package.json
minimum dependency to^1.5.0
should fix the error.How are you starting the agent? (please tick one of the boxes)
agent.start()
directly (e.g.require('elastic-apm-node').start(...)
)elastic-apm-node/start
from within the source code-r elastic-apm-node/start
Additional context
I would have quickly raised a PR for this, but I couldn't run the tests. (Also, a single-character PR isn't worth the hoops I'd have to jump through to sign the corporate CLA, unfortunately.)
The text was updated successfully, but these errors were encountered: