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

[bug] Unexpected Reference to Instrumentation.AspNet.TelemetryHttpModule from Instrumentation.Wcf #2452

Closed
jonmotos opened this issue Jan 6, 2025 · 5 comments
Labels
bug Something isn't working comp:instrumentation.wcf Things related to OpenTelemetry.Instrumentation.Wcf

Comments

@jonmotos
Copy link

jonmotos commented Jan 6, 2025

Component

OpenTelemetry.Instrumentation.Wcf

Package Version

Package Name Version
OpenTelemetry.Api 1.9.0
OpenTelemetry 1.9.0
OpenTelemetry.ProviderBuilderExtensions 1.9.0
OpenTelemetry.Exporter.OpenTelemetryProtocol 1.9.0
OpenTelemetry.Instrumentation.Http 1.9.0
OpenTelemetry.Instrumentation.Wcf 1.0.0-rc.18

Runtime Version

net48

Description

Trying to use Instrumentation.Wcf within Net48 project, add Wcf package.config reference
On running application, receiving the following "partial binding error", referencing a DLL that it seems the Wcf package does not reference. Any idea why this might be?

Steps to Reproduce

Add Wcf package, on application startup receive "FileNotFoundException"

Expected Result

No errors or exceptions

Actual Result

On application startup receive "FileNotFoundException"

Additional Context

Unfortunately my build is part of a legacy product with many intricacies involved in the build. The fusion log generated is as follows:

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable  xxx\build\bin\raw\x64\dbg\Host.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: DisplayName = OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///xxx/build/bin/raw/x64/dbg/
LOG: Initial PrivatePath = NULL
Calling assembly : OpenTelemetry.Instrumentation.Wcf, Version=1.0.0.214, Culture=neutral, PublicKeyToken=7bd6737fe5b67e3c.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: xxx\build\bin\raw\x64\dbg\Host.exe.Config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///xxx/build/bin/raw/x64/dbg/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule.DLL.
LOG: Attempting download of new URL file:///xxx/build/bin/raw/x64/dbg/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule.DLL.
LOG: Attempting download of new URL file:///xxx/build/bin/raw/x64/dbg/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule.EXE.
LOG: Attempting download of new URL file:///xxx/build/bin/raw/x64/dbg/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule.EXE.
@jonmotos jonmotos added the bug Something isn't working label Jan 6, 2025
@github-actions github-actions bot added the comp:instrumentation.wcf Things related to OpenTelemetry.Instrumentation.Wcf label Jan 6, 2025
Copy link
Contributor

github-actions bot commented Jan 6, 2025

Tagging component owner(s).

@CodeBlanch

@CodeBlanch
Copy link
Member

@repl-chris Seems we have a catch in this reflection code inside WCF which attempts to hook into TelemetryHttpModule, any idea why user would still blow up?

WcfInstrumentationEventSource.Log.AspNetReflectionFailedToBind(ex);

@repl-chris
Copy link
Contributor

IIRC the binding failure is expected when you do not also have the (optional) ASP.NET instrumentation installed - it's a supported configuration and should not have any impact other than generating a fusion log entry. I'd be interested to see the callstack of the FileNotFoundException.

@tjanoe12
Copy link

tjanoe12 commented Jan 7, 2025

Good to know and it checks out with some more testing today, thank you! For reference here is the call stack.
Opentelemetry WCF call stack

@jonmotos
Copy link
Author

jonmotos commented Jan 7, 2025

I'll close since it looks like it's not an "issue" per se, we were just dealing with build related binding errors and mistook this for the same. Thanks all for your help!

@jonmotos jonmotos closed this as completed Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working comp:instrumentation.wcf Things related to OpenTelemetry.Instrumentation.Wcf
Projects
None yet
Development

No branches or pull requests

4 participants