-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Native encode add null value to metrics data type value #18558
Comments
Hi @ee07b415 ! Thanks for filing this. That stack trace doesn't seem to be pointing to code in |
Hi @jszwedko , yeah, I add unit test for testing:
|
Perfect, thanks @ee07b415 ! This'll be helpful to fix the issue. |
According to #18557 this also affects the |
Hi @pront , sorry for the confusion, the above configure is for generate the console output of the data, the panic is at the http server vector, for example you can start another vector with the config as:
and send the data from the previous vector to this source:
|
Oh, actually another thing I forgot to mention @pront and @jszwedko above is I bypass all the as_mut_log in the http server enrich_events, otherwise you will encounter #17056 first before this invalid type issue. A example change:
This is the reason I file a separate issue from 17056 which I want to test whether the native_json will work properly if we fixed 17056 |
I was able to reproduce this with the following configs and v0.32.0:
[sources.source0]
type = "internal_metrics"
[sinks.sink0]
type = "http"
inputs = ["source0"]
uri = "http://127.0.0.1:8080"
encoding.codec = "native_json"
framing.method = "newline_delimited"
[sources.source0]
type = "http_server"
address = "0.0.0.0:8080"
decoding.codec = "native_json"
framing.method = "newline_delimited"
[sinks.sink0]
inputs = ["source0"]
print_interval_secs = 1
type = "blackhole" The instance running
|
Thank you @jszwedko and @ee07b415. I didn't really dive into this, but I noticed we use
This is an interesting discussion that explains the problem well. |
A note for the community
Problem
I'm testing the native_json encode and decode as the sink and source, the vector service always runs into the panic as:
And I try to print all the native_json enabled data find:
We have a null value at the butcket upper_limit, changing this to a number will solve the problem, so I think the problem is why encoder pick null while we are looking for number.
Add the prometheus exporter output for the metrics:
Configuration
Version
vector 0.33.0
Debug Output
Example Data
No response
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: