Skip to content

{169607487} feat: enable distributed trace addon by default#5709

Merged
SChakravorti21 merged 1 commit intobloomberg:mainfrom
SChakravorti21:port-dt
Feb 17, 2026
Merged

{169607487} feat: enable distributed trace addon by default#5709
SChakravorti21 merged 1 commit intobloomberg:mainfrom
SChakravorti21:port-dt

Conversation

@SChakravorti21
Copy link
Contributor

@SChakravorti21 SChakravorti21 commented Feb 4, 2026

Enable the (Bloomberg-internal) distributed trace plugin by default so that users get it out of the box. For open source builds of cdb2api, this is a no-op.

Additionally, provide a way to disable this behavior. We already have the ability to do so through an environment variable
(COMDB2_CONFIG_UNINSTALL_STATIC_LIBS=dt) or using the config file (comdb2_config:uninstall_static_libs_v4=dt), but both only accept one addon name. If we want to enable more plugins by default in the future, users should be able to selectively disable them as well. Support supplying a list of plugin names for both the environment variable and the config file setting.

@SChakravorti21 SChakravorti21 force-pushed the port-dt branch 4 times, most recently from 228ec92 to ce37fc5 Compare February 4, 2026 20:43
roborivers

This comment was marked as outdated.

@SChakravorti21
Copy link
Contributor Author

/plugin-branch port-dt

Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style check: Success ✓.
Cbuild submission: Error ⚠.
Regression testing: 0/0 tests failed ⚠.

Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style check: Success ✓.
Cbuild submission: Error ⚠.
Regression testing: 0/0 tests failed ⚠.

Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style check: Success ✓.
Cbuild submission: Success ✓.
Regression testing: 0/0 tests failed ⚠.

@SChakravorti21 SChakravorti21 force-pushed the port-dt branch 2 times, most recently from 5d5402d to 33fa914 Compare February 5, 2026 19:04
Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style check: Success ✓.
Cbuild submission: Success ✓.
Regression testing: 0/0 tests failed ⚠.

Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style check: Success ✓.
Cbuild submission: Success ✓.
Regression testing: Success ✓.

The first 10 failing tests are:
sirace [setup failure]
catchup_idle [setup failure]
truncatesc [setup failure]
maxtable [setup failure]
cinsert_linearizable [setup failure]
socksql_master_swings [setup failure]
systable_locking [setup failure]
verify_writes [setup failure]
sc_force [setup failure]
truncatesc_offline_generated [setup failure]

Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style check: Success ✓.
Cbuild submission: Success ✓.
Regression testing: Success ✓.

The first 10 failing tests are:
consumer_non_atomic_default_consumer_generated
api_dl_libs
insert_lots_ssl_generated
insert_lots

@SChakravorti21 SChakravorti21 force-pushed the port-dt branch 4 times, most recently from d5749c2 to 6692070 Compare February 12, 2026 19:50
chands10
chands10 previously approved these changes Feb 12, 2026
* so users still have a way to disable it, if so desired. */
if (cdb2_install != NULL) {
pthread_mutex_lock(&cdb2_sockpool_mutex);
(*cdb2_install)("dt");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compile this conditionally under COMDB2_BBCMAKE? what do you think.

I would probably introduce a compile time option, say, COMDB2_INIT_ADDONS, pass it here, and define it to dt in builddb.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in bb-plugins you mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I was thinking something similar, like cdb2_install_default_libs that is only defined in BB build. Then this code would become:

if (cdb2_install_default_libs != NULL) {
    pthread_mutex_lock(&cdb2_sockpool_mutex);
    (*cdb2_install_default_libs)();
    pthread_mutex_unlock(&cdb2_sockpool_mutex);
}

Is this along the lines of what you're thinking?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or do you mean just defining the list of addons as a compile time flag? Like a CMake flag -DCOMDB2_INIT_ADDONS="dt".

Copy link
Contributor

@chands10 chands10 Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured the second one, for default addons

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that idea actually

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#ifdef CDB2_INIT_ADDONS
(*cdb2_install)(STRINGIFY(CDB2_INIT_ADDONS));
#endif

And in builddb (or however Salil has decided to build it internally), we define CDB2_INIT_ADDONS to dt.

I think it makes code clear if we hide dt from open source.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good to me! Going to merge this PR for now since there's multiple follow-up items and I don't want the two APIs to diverge. Will address in a follow-up PR.

Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cbuild submission: Success ✓.
Regression testing: Success ✓.

Enable the (Bloomberg-internal) distributed trace plugin by default so that
users get it out of the box. For open source builds of cdb2api, this is a no-op.

Additionally, provide a way to disable this behavior. We already have the
ability to do so through an environment variable
(`COMDB2_CONFIG_UNINSTALL_STATIC_LIBS=dt`) or using the config file
(`comdb2_config:uninstall_static_libs_v4=dt`), but both only accept _one_ addon
name. If we want to enable more plugins by default in the future, users should
be able to selectively disable them as well. Support supplying a list of plugin
names for both the environment variable and the config file setting.

Signed-off-by: Shoumyo Chakravorti <schakravorti@bloomberg.net>
Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cbuild submission: Error ⚠.
Regression testing: Success ✓.

The first 10 failing tests are:
consumer_non_atomic_default_consumer_generated
reco-ddlk-sql

Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cbuild submission: Success ✓.
Regression testing: Success ✓.

The first 10 failing tests are:
consumer_non_atomic_default_consumer_generated

@SChakravorti21 SChakravorti21 merged commit 062858e into bloomberg:main Feb 17, 2026
4 checks passed
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.

4 participants