Skip to content

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

@demorgi

Description

@demorgi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions