opentelemetry-angular-interceptor icon indicating copy to clipboard operation
opentelemetry-angular-interceptor copied to clipboard

Configuration alternatives

Open dgarciarubio opened this issue 4 years ago • 2 comments

Currently, the recommended approach to configure the interceptor is by using the angular environment files. This approach has a downside, which is that a different build must be used for each environment by executing ng build --configuration=environmentName. This results in a different build artifact for each environment, which in my opinion is not desirable.

For this reason I usually try to configure angular applications using json settings files as described here. This approach uses an injectable service to load the json settings files through http requests. However, in the case of this library this causes issues because these requests would themselves be traced, and the settings to do that have not yet been obtained.

Is there any other way we can configure this library, without having to build an artifact for each environment, and without having to make http requests?

dgarciarubio avatar Jul 02 '21 13:07 dgarciarubio

I understand your problem. I'm going to see that.

jufab avatar Jul 05 '21 13:07 jufab

I found something to configure this library with an external configuration : I prepared a PR to do that with an example.

jufab avatar Nov 19 '21 23:11 jufab