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

Support for .net WCF using .net Standard IServiceProvider #933

Closed
no1ross opened this issue Aug 22, 2020 · 3 comments
Closed

Support for .net WCF using .net Standard IServiceProvider #933

no1ross opened this issue Aug 22, 2020 · 3 comments
Labels
enhancement New feature or request instrumentation

Comments

@no1ross
Copy link

no1ross commented Aug 22, 2020

Is your feature request related to a problem? Please describe.
I'm designing a framework that serves both .net Core and .net Framework WCF services. The base framework is designed with .net Standard 2.0/2.1, and has 2 host libraries, 1 for .net Core and 1 for .net Framework WCF, they both share at least 20 modules/clients that do various tasks. The framework works great, we have data/rule/content/mongo/elastic etc. clients, also many modules that do logging/caching/proccessing/interception etc.

I have started to integrate APM into the WCF project and have had many issues. First issue is that for some reason the APM agent is always initialized no matter how i try to initialize it. We need to be able to specify the IApmLogger and IConfigurationReader, as even though this is a WCF service we use the application.json files to load configuration. I have pretty much removed the need to read from a web.config as our CI process prefers tokenized json files rather xpaths in a config file.

Describe the solution you'd like
A way to start APM with the specific configuration and logger while creating the IServiceProvider in a WCF project. We don't have access to IApplicationBuilder like in a .net core app, all have access to is new IServiceCollection. There needs to be a more .net standard friendly way of initializing the apm agent for .net framework wcf application. For some reason even when using the web.config, the agent was always trying to initialize from env varaiables, why can't we tell the .net framework agent that i want to use the IConfiguration for the configuration at all time and never look at env or web.config...

Describe alternatives you've considered
As above i tried to create my own agent, but that was a no go :(.

Additional context
Consumers of this agent need the ability to customize it to their needs, I was planning to go to production with this in October, but now things are delayed due to the fact that the current implementation does not support our needs.

@no1ross no1ross added the enhancement New feature or request label Aug 22, 2020
@no1ross
Copy link
Author

no1ross commented Aug 22, 2020

To add I would prefer to add the IHttpModule to the IServiceCollection in the Application_Start(), then in the Init() of the HttpApplication do module.Init(this); LIke I said i want to remove the need for web.config. I think the bottom line is we need more flexibility in how we use this agent.

@russcam
Copy link
Contributor

russcam commented Nov 4, 2021

@no1ross instrumenting WCF more generally is something that we could tackle with profiler auto instrumentation: #1534, instrumenting around ChannelHandler's HandleRequest method

@stevejgordon
Copy link
Contributor

We have no plans to focus on WCF support at the current time. The recommended solution is to consider the OTel SDK and instrumentation which has support for WCF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request instrumentation
Projects
None yet
Development

No branches or pull requests

4 participants