Skip to content

[8.19] (backport #17135) TBS: Log pubsub errors at error or warn level#17179

Merged
mergify[bot] merged 5 commits into8.19from
mergify/bp/8.19/pr-17135
Jun 11, 2025
Merged

[8.19] (backport #17135) TBS: Log pubsub errors at error or warn level#17179
mergify[bot] merged 5 commits into8.19from
mergify/bp/8.19/pr-17135

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Jun 10, 2025

Motivation/summary

  • Surface pubsub subscriber errors by logging at Warn level for 429 and Error level for others, instead of Debug level. Do not log context canceled. This may introduce noise to logs, e.g. when ES returns 429, but at worst it will only log one line every search interval (default = 1m/2 = 30s) which is acceptable.
  • Also change publisher logs from debug level to error level.

Checklist

- [ ] Update CHANGELOG.asciidoc to be done on release

  • Documentation has been updated

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

Covered by unit tests

Related issues

Fixes #17117


This is an automatic backport of pull request #17135 done by [Mergify](https://mergify.com).

* Surface pubsub subscriber errors by logging at Warn level for 429 and Error level for others, instead of Debug level. Do not log context canceled. This may introduce noise to logs, e.g. when ES returns 429, but at worst it will only log one line every search interval (default = 1m/2 = 30s) which is acceptable.
* Also change publisher logs from debug level to error level.

(cherry picked from commit 6d41432)

# Conflicts:
#	x-pack/apm-server/sampling/pubsub/pubsub_test.go
@mergify mergify bot requested a review from a team as a code owner June 10, 2025 20:40
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Jun 10, 2025
@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Jun 10, 2025

Cherry-pick of 6d41432 has failed:

On branch mergify/bp/8.19/pr-17135
Your branch is up to date with 'origin/8.19'.

You are currently cherry-picking commit 6d414320.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   x-pack/apm-server/sampling/pubsub/checkpoints.go
	modified:   x-pack/apm-server/sampling/pubsub/pubsub.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   x-pack/apm-server/sampling/pubsub/pubsub_test.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Jun 11, 2025

This pull request has been removed from the queue for the following reason: checks failed.

The merge conditions cannot be satisfied due to failing checks:

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

github.com/elastic/beats/v7 v7.0.0-alpha2.0.20250512132743-f26db7122f07
github.com/elastic/elastic-agent-client/v7 v7.17.0
github.com/elastic/elastic-agent-libs v0.19.2
github.com/elastic/elastic-agent-libs v0.19.6
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[to reviewer] needed for elastic/elastic-agent-libs#312

@mergify mergify bot merged commit bdaf550 into 8.19 Jun 11, 2025
15 checks passed
@mergify mergify bot deleted the mergify/bp/8.19/pr-17135 branch June 11, 2025 10:16
@lahsivjar lahsivjar mentioned this pull request Jun 24, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport conflicts There is a conflict in the backported pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant