Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bottlecap/src/bin/bottlecap/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ async fn extension_loop_active(

// Validate and get the appropriate flush strategy for the current mode
let flush_strategy = get_flush_strategy_for_mode(&aws_config, config.serverless_flush_strategy);
debug!("Flush strategy: {:?}", flush_strategy);
let mut flush_control = FlushControl::new(flush_strategy, config.flush_timeout);

debug!(
Expand Down
6 changes: 6 additions & 0 deletions bottlecap/src/logs/lambda/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ impl LambdaProcessor {
#[allow(clippy::too_many_lines)]
async fn get_message(&mut self, event: TelemetryEvent) -> Result<Message, Box<dyn Error>> {
let copy = event.clone();

// Log all non-Extension telemetry events to avoid infinite loop
if !matches!(event.record, TelemetryRecord::Extension(_)) {
debug!("LOGS | Incoming telemetry event: {:?}", event.record);
}

Comment on lines +91 to +96
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are already logging telemetry events here:

debug!("Telemetry event received: {:?}", event);

Is the new log added to help debug what happens in between?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, helpful for what happens in between. When I was looking at logs for Durable Functions, it seemed like we were missing some things.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably revert this. If we’re missing something for durable functions then let’s find out why it’s not being captured and sent to Datadog or via a Datadog flare. This will cause us to double log everything the user sends if debug logs are enabled, which will more than 2x the cost for no value.

match event.record {
TelemetryRecord::Function(v) => {
let (request_id, message) = match v {
Expand Down
Loading