Skip to content
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

InstrumentationAbstract#setConfig doesn't honor enabled flag #2257

Closed
1 of 2 tasks
Flarna opened this issue Jun 5, 2021 · 5 comments
Closed
1 of 2 tasks

InstrumentationAbstract#setConfig doesn't honor enabled flag #2257

Flarna opened this issue Jun 5, 2021 · 5 comments
Labels
Discussion Issue or PR that needs/is extended discussion. stale

Comments

@Flarna
Copy link
Member

Flarna commented Jun 5, 2021

  • This only affects the JavaScript OpenTelemetry library
  • This may affect other libraries, but I would like to get opinions here first

Enabling of an Instrumentation is done automatically if user is not explicit disabling it. See InstrumentationAbstract constructor

If later config is updated using setConfig the config.enabled flag is not evaluated nor defaulted.

Should we add defaulting of enabled in setConfig and also call enable/disable there? Or is it up to the user?

@vmarchaud
Copy link
Member

I think we should respect it when defined, othersiwe consider that it should be enabled

@vmarchaud vmarchaud added the Discussion Issue or PR that needs/is extended discussion. label Jun 6, 2021
@Flarna
Copy link
Member Author

Flarna commented Jun 6, 2021

It might be needed to disable and enable an instrumentation to ensure the new settings are applied everywhere. On the other hand this could cause problems if this includes unpatch and repatch.

@dyladan
Copy link
Member

dyladan commented Jun 16, 2021

I think automatically enabling/disabling is probably dangerous. Maybe instead we could emit some onConfigurationChanged event and let the instrumentations deal with it how they want.

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale label Mar 28, 2022
@github-actions
Copy link

This issue was closed because it has been stale for 14 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Issue or PR that needs/is extended discussion. stale
Projects
None yet
Development

No branches or pull requests

3 participants