Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporterhelper] Adding shutdown & startup debug logs for retry, queue, and batch sender #10208

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

timannguyen
Copy link
Contributor

Description

Adding debug logs to starting and shutdown of batch, retry, and queue sender in exporterhelper to understand which component is stuck shutting down or starting up. This is added in order to improve debugging when one of these components are stuck shutting down or starting up.

Link to tracking issue

Fixes #10201

Testing

N/A

Documentation

N/A

@timannguyen timannguyen requested a review from a team as a code owner May 22, 2024 15:34
@timannguyen timannguyen changed the title Adding shutdown and startup debug logs for retry, queue, and batch se… Adding shutdown & startup debug logs for retry, queue, and batch sender May 22, 2024
Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.99%. Comparing base (a90fa50) to head (822f427).
Report is 97 commits behind head on main.

Current head 822f427 differs from pull request most recent head 8305715

Please upload reports for the commit 8305715 to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10208   +/-   ##
=======================================
  Coverage   91.99%   91.99%           
=======================================
  Files         361      361           
  Lines       16970    16980   +10     
=======================================
+ Hits        15611    15621   +10     
  Misses       1021     1021           
  Partials      338      338           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 142 to 143
qs.logger.Debug("Started Queue Sender", zap.String(obsmetrics.ExporterKey, qs.fullName), zap.Error(err))
errs = multierr.Append(errs, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
qs.logger.Debug("Started Queue Sender", zap.String(obsmetrics.ExporterKey, qs.fullName), zap.Error(err))
errs = multierr.Append(errs, err)
errs = multierr.Append(errs, err)
qs.logger.Debug("Started Queue Sender", zap.String(obsmetrics.ExporterKey, qs.fullName), zap.Error(errs))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved

@@ -91,6 +94,7 @@ func (bs *batchSender) Start(_ context.Context, _ component.Host) error {
}
}()

bs.logger.Debug("Started Batch Sender", zap.String(obsmetrics.ExporterKey, bs.fullName))
Copy link
Member

Choose a reason for hiding this comment

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

I think the obsmetrics.ExporterKey entry is not necessary, the logger will have a "name" entry (see https://github.com/open-telemetry/opentelemetry-collector/blob/main/service/internal/components/loggers.go#L38) with this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the exporter key from all the logs.

@timannguyen timannguyen changed the title Adding shutdown & startup debug logs for retry, queue, and batch sender [exporterhelper] Adding shutdown & startup debug logs for retry, queue, and batch sender May 23, 2024
@bogdandrutu bogdandrutu dismissed their stale review May 25, 2024 12:27

Removing blocking since the main issue was fixed, I still am not sure why we need this.

@timannguyen
Copy link
Contributor Author

@bogdandrutu is there anything else i need to address?

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added Stale and removed Stale labels Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There should be more observability around exporter helper start up and shutdown
4 participants