Skip to content

Commit

Permalink
comment stuff again
Browse files Browse the repository at this point in the history
  • Loading branch information
noisyscanner committed Oct 23, 2024
1 parent 66cf6e6 commit 0ffd791
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions metrics/src/logprocessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,15 @@ pub async fn log_processor(logline: &String, metric_obj: &Telemetry, tracer: &tr
};

//Send log to opentel:
tracer.in_span("hasura-log", |cx| {
let span = cx.span();
span.add_event(
logline.clone(),
vec![],
);
span.set_attribute(KeyValue::new("hasura-timestamp", log.timestamp));
span.set_attribute(KeyValue::new("hasura-logtype", log.logtype));
});
// tracer.in_span("hasura-log", |cx| {
// let span = cx.span();
// span.add_event(
// logline.clone(),
// vec![],
// );
// span.set_attribute(KeyValue::new("hasura-timestamp", log.timestamp));
// span.set_attribute(KeyValue::new("hasura-logtype", log.logtype));
// });
}
Err(e) => {
warn!("Failed to parse log line: {}", e);
Expand Down
4 changes: 2 additions & 2 deletions metrics/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {

debug!("Configuration: {:?}", config);

let terminate_rx = signal_handler();
// let terminate_rx = signal_handler();

let metric_obj: Telemetry = Telemetry::new(config.common_labels.clone().unwrap_or_default(),config.histogram_buckets.clone());
let metric_obj = web::Data::new(metric_obj);
Expand All @@ -202,7 +202,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
webserver(&config),
// logreader::read_file(&tracer, &log_file, &metric_obj, config.sleep_time, terminate_rx.clone()),
logreceiver::ws_server(&config, tracer.clone(), metric_obj.clone()),
collectors::run_metadata_collector(&config, &metric_obj, terminate_rx.clone())
// collectors::run_metadata_collector(&config, &metric_obj, terminate_rx.clone())
);

match res {
Expand Down

0 comments on commit 0ffd791

Please sign in to comment.