Skip to content

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

Merged
mergify[bot] merged 3 commits into9.0from
mergify/bp/9.0/pr-17135
Jun 10, 2025
Merged

[9.0] (backport #17135) TBS: Log pubsub errors at error or warn level#17180
mergify[bot] merged 3 commits into9.0from
mergify/bp/9.0/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/checkpoints.go
#	x-pack/apm-server/sampling/pubsub/pubsub.go
#	x-pack/apm-server/sampling/pubsub/pubsub_test.go
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Jun 10, 2025
@mergify mergify bot requested a review from a team as a code owner June 10, 2025 20:41
@mergify mergify bot added the backport label 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/9.0/pr-17135
Your branch is up to date with 'origin/9.0'.

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)

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

no changes added to commit (use "git add" and/or "git commit -a")

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

@mergify mergify bot added the conflicts There is a conflict in the backported pull request label Jun 10, 2025
@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 mergify bot merged commit c64dc82 into 9.0 Jun 10, 2025
15 checks passed
@mergify mergify bot deleted the mergify/bp/9.0/pr-17135 branch June 10, 2025 21:06
@endorama endorama mentioned this pull request Jun 20, 2025
3 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