Skip to content

Setting experimental metricsAggregator: true does not respect enabled setting and hangs on connecting #10837

Closed

Description

@Jimmy89

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/serverless

SDK Version

7.103.0

Framework Version

NodeJS 20.10

Link to Sentry event

No response

SDK Setup

Index.mjs

import Sentry from "@sentry/serverless";
// Important: no DSN is inserted, no Sentry environment variables are set, these are all values given to Sentry
Sentry.AWSLambda.init({
    enabled: false,
    _experiments: {
        metricsAggregator: true,
    },
});

console.log("I keep running");

Steps to Reproduce

  1. Run code with node index.mjs
  2. The node process will never stop, it 'hangs' on the metricsAggregator to 'finish' or something, which never happens.

Expected Result

Sentry not doing anything as it is disabled.

Actual Result

Need to kill the node process the hard way.

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 2on Feb 28, 2024
  2. AbhiPrasad commented on Feb 28, 2024

    @AbhiPrasad
    Contributor

    If you add debug: true, to your Sentry.init, what shows up in the logs?

  3. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 2on Feb 28, 2024
  4. Jimmy89 commented on Feb 29, 2024

    @Jimmy89
    Author

    Only the basic Sentry Logger [warn]: No DSN provided, client will not send events. message (which is expected as I also disable Sentry), whether the plugin is added or not.
    No other messages. Were you able to reproduce the issue as well?

  5. moved this to Waiting for: Product Owner in GitHub Issues with 👀 2on Feb 29, 2024
  6. AbhiPrasad commented on Mar 5, 2024

    @AbhiPrasad
    Contributor

    I was able to reproduce this issue. It seems something is being problematic and not letting the node process exit.

    For now you can resolve this by only setting the metricsAggregator experiment if the dsn is defined. We currently don't have the bandwidth to dig deeper for now, but PRs are welcome if you would like to help us out! Thanks.

  7. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 2on Mar 5, 2024
  8. AbhiPrasad commented on Apr 10, 2024

    @AbhiPrasad
    Contributor

    Fixed with #11483, will be released end of this week.

  9. AbhiPrasad commented on Apr 11, 2024

    @AbhiPrasad
    Contributor
  10. ghost added on Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions