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

Fix invalid message polluting subsequent message #98

Merged
merged 1 commit into from
Dec 14, 2023
Merged

Fix invalid message polluting subsequent message #98

merged 1 commit into from
Dec 14, 2023

Conversation

kaorimatz
Copy link
Contributor

@kaorimatz kaorimatz commented Dec 5, 2023

A message that cannot be converted to msgpack currently pollutes a subsequent message. For example,

logger = Fluent::Logger::FluentLogger.new
logger.post_with_time('tag1', { foo: 1 << 64 }, Time.utc(2023, 12, 05)) # FluentLogger: Can't convert to msgpack: ["tag", 1701734400, {:foo=>18446744073709551616}]: bignum too big to convert into `unsigned long long'
logger.post_with_time('tag2', { bar: 'bar' }, Time.utc(2023, 12, 06))

sends the following message

2023-12-05T00:00:00+00:00       tag1     {"foo":["tag2",1701820800,{"bar":"bar"}]}

instead of the following.

2023-12-06T00:00:00+00:00       tag2     {"bar":"bar"}

Signed-off-by: Satoshi Matsumoto <kaorimatz@gmail.com>
@ashie ashie merged commit cb7f00e into fluent:master Dec 14, 2023
5 checks passed
@ashie
Copy link
Member

ashie commented Dec 14, 2023

Thanks!

@ashie
Copy link
Member

ashie commented Dec 14, 2023

We need to release a new version, but I don't have ownership of this gem on RubyGems.
https://rubygems.org/gems/fluent-logger

Could you add me as an onwer of this gem on RubyGems? @frsyuki @repeatedly

@kaorimatz kaorimatz deleted the fix-message-pollution branch December 14, 2023 04:33
@ashie
Copy link
Member

ashie commented Dec 20, 2023

Could you add me as an onwer of this gem on RubyGems? @frsyuki @repeatedly

I've received your invitation. Thanks!

@ashie
Copy link
Member

ashie commented Dec 20, 2023

I've released v0.9.1.

@kaorimatz
Copy link
Contributor Author

@ashie Awesome, thank you for reviewing the change and releasing a new version. (Thanks to @frsyuki for adding @ashie as a gem owner.)

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

Successfully merging this pull request may close these issues.

None yet

2 participants