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

Open telemetry subscriber thows null reference when using azure service bus without connection string #1432

Closed
demorgi opened this issue Nov 16, 2023 · 2 comments

Comments

@demorgi
Copy link
Contributor

demorgi commented Nov 16, 2023

Open telemetry diagnostic listener fails when Azure service bus is used without a connection string.
Azure service bus supports automatic connections when using managed identities, so you don't have to specify connection string. Diagnostic listener has this code that throws a null reference as BrokerAddress.Endpoint is null.
https://github.com/dotnetcore/CAP/blob/7ba52a8defa73f3866001dea6dd6af434574c3d2/src/DotNetCore.CAP.OpenTelemetry/DiagnosticListener.cs#L108C1-L109C1

Workaround #1
Explicitly set the connection string for Azure service bus to string empty when registering CAP

@yang-xiaodong
Copy link
Member

Hi @demorgi ,

Thanks for your report, you're right , would you want to submit a PR to fix it?

@yang-xiaodong
Copy link
Member

Fixed in version 8.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants