@@ -26,10 +26,10 @@ use chrono::Utc;
26
26
use http:: StatusCode ;
27
27
use serde_json:: Value ;
28
28
29
- use crate :: event;
30
29
use crate :: event:: error:: EventError ;
31
30
use crate :: event:: format:: known_schema:: { self , KNOWN_SCHEMA_LIST } ;
32
31
use crate :: event:: format:: { self , EventFormat , LogSource , LogSourceEntry } ;
32
+ use crate :: event:: { self , FORMAT_KEY , USER_AGENT_KEY } ;
33
33
use crate :: handlers:: { EXTRACT_LOG_KEY , LOG_SOURCE_KEY , STREAM_NAME_HEADER_KEY } ;
34
34
use crate :: metadata:: SchemaVersion ;
35
35
use crate :: option:: Mode ;
@@ -124,7 +124,9 @@ pub async fn ingest_internal_stream(stream_name: String, body: Bytes) -> Result<
124
124
let size: usize = body. len ( ) ;
125
125
let json: Value = serde_json:: from_slice ( & body) ?;
126
126
let schema = PARSEABLE . get_stream ( & stream_name) ?. get_schema_raw ( ) ;
127
-
127
+ let mut p_custom_fields = HashMap :: new ( ) ;
128
+ p_custom_fields. insert ( USER_AGENT_KEY . to_string ( ) , "parseable" . to_string ( ) ) ;
129
+ p_custom_fields. insert ( FORMAT_KEY . to_string ( ) , LogSource :: Pmeta . to_string ( ) ) ;
128
130
// For internal streams, use old schema
129
131
format:: json:: Event :: new ( json)
130
132
. into_event (
@@ -136,7 +138,7 @@ pub async fn ingest_internal_stream(stream_name: String, body: Bytes) -> Result<
136
138
None ,
137
139
SchemaVersion :: V0 ,
138
140
StreamType :: Internal ,
139
- & HashMap :: new ( ) ,
141
+ & p_custom_fields ,
140
142
) ?
141
143
. process ( ) ?;
142
144
0 commit comments