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

bytes conversion to decimal type #27

Closed
dwi-mfbcs opened this issue Jan 21, 2022 · 0 comments · Fixed by #46
Closed

bytes conversion to decimal type #27

dwi-mfbcs opened this issue Jan 21, 2022 · 0 comments · Fixed by #46

Comments

@dwi-mfbcs
Copy link

We have kafka messages specified based on Avro schema. Some fields are defined as bytes but having Decimal as the logical type, like this:

{"name": "myField", "type": ["null", {"type": "bytes", "logicalType": "decimal", "precision": 11, "scale": 2}], "default": null, "doc": "BigDecimal with precision 11 scale 2"},

When messages imported into datadog as logs, it appears that myField are set as bytes instead of its logical type Decimal.

Am I missing some configuration, or is this currently not supported?

jszwedko added a commit that referenced this issue Apr 23, 2024
Currently incoming `BigDecimal` values (e.g. from avro decoding) are
encoded as base64 strings (the default) by the JsonConverter. Instead,
it seems to make more sense to encode them as numeric values when
publishing to Datadog.

I considered making this configurable, but it seems unlikely that users
would want the current behavior since it makes the data much less
scruitable in Datadog. If we find this not to be the case (through an
issue report) we can add a configuration option later. As it stands,
I think it is a bug.

Fixes: #27

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
jszwedko added a commit that referenced this issue Apr 24, 2024
Currently incoming `BigDecimal` values (e.g. from avro decoding) are
encoded as base64 strings (the default) by the JsonConverter. Instead,
it seems to make more sense to encode them as numeric values when
publishing to Datadog.

I considered making this configurable, but it seems unlikely that users
would want the current behavior since it makes the data much less
scruitable in Datadog. If we find this not to be the case (through an
issue report) we can add a configuration option later. As it stands,
I think it is a bug.

Fixes: #27

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
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 a pull request may close this issue.

1 participant