Open madson7 opened 1 day ago
environment:
- VECTOR_LOG=debug
Debug Output
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:02.116824Z DEBUG hyper::proto::h1::io: flushed 1849 bytes
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:02.118486Z DEBUG hyper::proto::h1::io: parsed 5 headers
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:02.118534Z DEBUG hyper::proto::h1::conn: incoming body is empty
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:02.118602Z DEBUG sink{component_kind="sink" component_id=http component_type=http}:request{request_id=491}:http: hyper::client::pool: pooling idle connection for ("http", 9.0.4.206:9428)
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:02.118643Z DEBUG sink{component_kind="sink" component_id=http component_type=http}:request{request_id=491}:http: vector::internal_events::http_client: HTTP response. status=200 OK version=HTTP/1.1 headers={"content-type": "application/json", "vary": "Accept-Encoding", "x-server-hostname": "victorialogs-\"manager02\"", "date": "Thu, 28 Nov 2024 04:23:02 GMT", "content-length": "0"} body=[empty]
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:02.511330Z DEBUG sink{component_kind="sink" component_id=http component_type=http}: vector::utilization: utilization=0.000028915188686934943
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:03.124428Z DEBUG sink{component_kind="sink" component_id=http component_type=http}:request{request_id=492}:http: vector::internal_events::http_client: Sending HTTP request. uri=http://9.0.4.206:9428/insert/jsonline?_stream_fields=source_type,host,container_name&_msg_field=log method=POST version=HTTP/1.1 headers={"content-type": "application/x-ndjson", "content-encoding": "gzip", "accountid": "0", "projectid": "0", "accept-encoding": "zstd,gzip,deflate,br", "user-agent": "Vector/0.42.0 (x86_64-unknown-linux-musl 3d16e34 2024-10-21 14:10:14.375255220)"} body=[1452 bytes]
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:03.124523Z DEBUG sink{component_kind="sink" component_id=http component_type=http}:request{request_id=492}:http: hyper::client::pool: reuse idle connection for ("http", 9.0.4.206:9428)
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:03.124818Z DEBUG hyper::proto::h1::io: flushed 1812 bytes
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:03.128297Z DEBUG hyper::proto::h1::io: parsed 5 headers
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:03.128495Z DEBUG hyper::proto::h1::conn: incoming body is empty
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:03.128596Z DEBUG sink{component_kind="sink" component_id=http component_type=http}:request{request_id=492}:http: hyper::client::pool: pooling idle connection for ("http", 9.0.4.206:9428)
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:03.128644Z DEBUG sink{component_kind="sink" component_id=http component_type=http}:request{request_id=492}:http: vector::internal_events::http_client: HTTP response. status=200 OK version=HTTP/1.1 headers={"content-type": "application/json", "vary": "Accept-Encoding", "x-server-hostname": "victorialogs-\"manager02\"", "date": "Thu, 28 Nov 2024 04:23:03 GMT", "content-length": "0"} body=[empty]
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:04.131990Z DEBUG sink{component_kind="sink" component_id=http component_type=http}:request{request_id=493}:http: vector::internal_events::http_client: Sending HTTP request. uri=http://9.0.4.206:9428/insert/jsonline?_stream_fields=source_type,host,container_name&_msg_field=log method=POST version=HTTP/1.1 headers={"content-type": "application/x-ndjson", "content-encoding": "gzip", "accountid": "0", "projectid": "0", "accept-encoding": "zstd,gzip,deflate,br", "user-agent": "Vector/0.42.0 (x86_64-unknown-linux-musl 3d16e34 2024-10-21 14:10:14.375255220)"} body=[1386 bytes]
vector_vector.0.yanc80sdyk5i@bull | 2024-11-28T04:23:04.132093Z DEBUG sink{component_kind="sink" component_id=http component_type=http}:request{request_id=493}:http: hyper::client::pool: reuse idle connection for ("http", 9.0.4.206:9428)
A note for the community
Problem
The behavior in transformations when I use version 0.40.0 of vector with the del(.) function is returning an empty json:
Vector Remap Language (VRL) is an expression-oriented language designed for transforming observability data. This playground lets you write a program, run it against an event or events, share it, and see how the events are transformed. Vector Version: 3d16e345 VRL Version: 0.19.0
The behavior in transformations when I use version 0.40.0 of vector with the del(.) function is returning an empty json:
Error
Configuration
Version
0.40.0
Debug Output
No response
Example Data
Additional Context
I'm facing a problem when using VRL (Vector Remap Language) in Vector. In the playground, I can perform all the desired operations, save the results in variables, and then apply del(.) to clean the previous data in the JSON, leaving only what was saved in the variables. Finally, I save the cleaned results in .log, and everything works as expected.
However, when I apply this logic in the transforms block of the vector.yaml file, the behavior is different. When I use del(.), the expected data is not saved in .log, that is, the JSON seems to be completely cleaned and the .log is empty.
If I remove the del(.), I notice that all the operations were performed correctly, but the old data remains in the JSON, without being replaced or overwritten. I also tried an alternative approach, using . = .log without del(.), but I was unsuccessful.
I would like to understand what is causing this difference between the playground and Vector, and what would be the best practice to clean the original JSON and save only the content of the variables processed in .log in vector.yaml.
References
No response