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

Enable replacing the ThreadPoolExecutor implementation #2063

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ammachado
Copy link

for OpenTelemetry thread context propagation

@reta
Copy link
Member

reta commented Sep 12, 2024

Thanks for the change, @ammachado . In CXF, we use bus extensions to provide alternative implementation (fe instrumented ones). For work queue, please use org.apache.cxf.workqueue.WorkQueueManager extension point where you could provide instrumented AutomaticWorkQueue implementation (over the default one, all classes are public). Thank you.

@ammachado
Copy link
Author

Thanks for the change, @ammachado . In CXF, we use bus extensions to provide alternative implementation (fe instrumented ones). For work queue, please use org.apache.cxf.workqueue.WorkQueueManager extension point where you could provide instrumented AutomaticWorkQueue implementation (over the default one, all classes are public). Thank you.

Can you you provide more details where I can find this extension point?

@reta
Copy link
Member

reta commented Sep 12, 2024

Can you you provide more details where I can find this extension point?

Sure, the default extensions come from [1] so you could have your own META-INF/cxf/bus-extensions.txt in application that overrides the default:

org.my.package.InstrumentedWorkQueueManagerImpl:org.apache.cxf.workqueue.WorkQueueManager:true

Upon initialization, the bus manager reads the extensions and initializes them. You could also do this programmatically:

bus.setExtension(org.apache.cxf.workqueue.WorkQueueManager.class, new org.my.package.InstrumentedWorkQueueManagerImpl());

[1] https://github.com/apache/cxf/blob/main/core/src/main/resources/META-INF/cxf/bus-extensions.txt

@ammachado
Copy link
Author

ammachado commented Sep 12, 2024

I'm not sure I understood what you're saying... this PR already have a bus-extensions.txt providing a new WorkQueueManager. Should I remove this and move to my applications?

@reta
Copy link
Member

reta commented Sep 13, 2024

Should I remove this and move to my applications?

Exactly, along with desired instrumentation, there are no changes required on CXF side.

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