Skip to content

fix: Add mongo heartbeatEnabled param to tracer entrypoint#5735

Closed
jeancornic wants to merge 1 commit intoDataDog:masterfrom
jeancornic:jeancornic/fix-mongo-heartbeatEnabled
Closed

fix: Add mongo heartbeatEnabled param to tracer entrypoint#5735
jeancornic wants to merge 1 commit intoDataDog:masterfrom
jeancornic:jeancornic/fix-mongo-heartbeatEnabled

Conversation

@jeancornic
Copy link
Copy Markdown
Contributor

What does this PR do?

This PR intends to fix the newly added heartbeatEnabled parameter for the mongo plugin.

Motivation

While the parameter is used in the plugin's code, I cannot use it as is in the tracer config, because of the missing typing.

error TS2353: Object literal may only specify known properties, and 'heartbeatEnabled' does not exist in type 'mongodb_core'

Additional Notes

Follows #5526 and #5562

@jeancornic jeancornic requested a review from a team as a code owner May 14, 2025 15:19
@BridgeAR
Copy link
Copy Markdown
Member

BridgeAR commented May 14, 2025

@jeancornic thank you for the PR! We intend to move more to environment variable usage instead of programmatic one. That allows this to later on also be defined from a remote source.
Is there a reason not to use the DD_TRACE_MONGODB_HEARTBEAT_ENABLED environment variable and setting it to 'false'?

[Edit] I guess we should support it, due to already providing the programmatic API. So adding the TS code is good. We must port the PR though, to be opened by a maintainer. Otherwise we can't run our CI.

@cit-pr-commenter
Copy link
Copy Markdown

PR Security Update

All commits in this PR up to and including 32535a1 have been reviewed and marked safe by SDLC security. For any questions, please reach out to #ci-for-external-contributors-collab on Slack.

@jeancornic
Copy link
Copy Markdown
Contributor Author

@BridgeAR thanks for your answer!
I ended up using the env variable yes, no worries. I was just surprised though by the code supporting a config parameter that is in the end not usable.

Cheers from an ex DD 🐶

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants