@@ -52,7 +52,7 @@ use crate::{
5252 format:: { LogSource , LogSourceEntry } ,
5353 } ,
5454 handlers:: {
55- STREAM_TYPE_KEY , TelemetryType ,
55+ DatasetTag , STREAM_TYPE_KEY , TelemetryType ,
5656 http:: {
5757 cluster:: { PMETA_STREAM_NAME , sync_streams_with_ingestors} ,
5858 ingest:: PostError ,
@@ -415,6 +415,7 @@ impl Parseable {
415415 let schema_version = stream_metadata. schema_version ;
416416 let log_source = stream_metadata. log_source ;
417417 let telemetry_type = stream_metadata. telemetry_type ;
418+ let dataset_tag = stream_metadata. dataset_tag ;
418419 let mut metadata = LogStreamMetadata :: new (
419420 created_at,
420421 time_partition,
@@ -426,6 +427,7 @@ impl Parseable {
426427 schema_version,
427428 log_source,
428429 telemetry_type,
430+ dataset_tag,
429431 ) ;
430432
431433 // Set hot tier fields from the stored metadata
@@ -471,6 +473,7 @@ impl Parseable {
471473 vec ! [ log_source_entry. clone( ) ] ,
472474 TelemetryType :: Logs ,
473475 & tenant_id,
476+ None
474477 )
475478 . await ;
476479
@@ -517,6 +520,7 @@ impl Parseable {
517520 log_source : Vec < LogSourceEntry > ,
518521 telemetry_type : TelemetryType ,
519522 tenant_id : & Option < String > ,
523+ dataset_tag : Option < DatasetTag > ,
520524 ) -> Result < bool , PostError > {
521525 if self . streams . contains ( stream_name, tenant_id) {
522526 return Ok ( true ) ;
@@ -549,6 +553,7 @@ impl Parseable {
549553 log_source,
550554 telemetry_type,
551555 tenant_id,
556+ dataset_tag,
552557 )
553558 . await ?;
554559
@@ -625,6 +630,7 @@ impl Parseable {
625630 stream_type,
626631 log_source,
627632 telemetry_type,
633+ dataset_tag,
628634 } = headers. into ( ) ;
629635
630636 let stream_in_memory_dont_update =
@@ -698,6 +704,7 @@ impl Parseable {
698704 vec ! [ log_source_entry] ,
699705 telemetry_type,
700706 tenant_id,
707+ dataset_tag,
701708 )
702709 . await ?;
703710
@@ -759,6 +766,7 @@ impl Parseable {
759766 log_source : Vec < LogSourceEntry > ,
760767 telemetry_type : TelemetryType ,
761768 tenant_id : & Option < String > ,
769+ dataset_tag : Option < DatasetTag > ,
762770 ) -> Result < ( ) , CreateStreamError > {
763771 // fail to proceed if invalid stream name
764772 if stream_type != StreamType :: Internal {
@@ -783,6 +791,7 @@ impl Parseable {
783791 } ,
784792 log_source : log_source. clone ( ) ,
785793 telemetry_type,
794+ dataset_tag,
786795 ..Default :: default ( )
787796 } ;
788797
@@ -812,6 +821,7 @@ impl Parseable {
812821 SchemaVersion :: V1 , // New stream
813822 log_source,
814823 telemetry_type,
824+ dataset_tag,
815825 ) ;
816826 let ingestor_id = INGESTOR_META
817827 . get ( )
0 commit comments