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]: RabbitMQ Basic Properties overwritten to default values #6723

Open
johang88 opened this issue Feb 27, 2025 · 1 comment · May be fixed by #6730 or #6753
Open

[BUG]: RabbitMQ Basic Properties overwritten to default values #6723

johang88 opened this issue Feb 27, 2025 · 1 comment · May be fixed by #6730 or #6753
Labels

Comments

@johang88
Copy link

Tracer Version(s)

3.11.1

Operating system and platform

Linux

Instrumentation Mode

manual with nuget package

TFM

net9.0

Bug Report

If BasicPublishAsync is called with a writable BasicProperties then PopulateBasicPropertiesHeaders in rabbitmq-dotnet-client will return null as no new object is created. In turn the instrumentation code will get a return value of null and create a new basic properties object resulting in all values having default values instead of the ones set by the caller.

Implementation in rabbitmq-dotnet-client: https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/85fd42fc6e245dc68901802967acbccc216b5980/projects/RabbitMQ.Client/Impl/Channel.BasicPublish.cs#L190

Implementation in dd-trace:

Reproduction Code

No response

@johang88
Copy link
Author

Extra context showing the null handling of the return value from https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/85fd42fc6e245dc68901802967acbccc216b5980/projects/RabbitMQ.Client/Impl/Channel.BasicPublish.cs#L75

As can be seen it will use the returned props if not null then they will be used instead of the supplied props object.

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