8000 fix(datadog_agent source): Silence the "Source send cancelled." error by bruceg · Pull Request #23097 · vectordotdev/vector · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(datadog_agent source): Silence the "Source send cancelled." error #23097

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bruceg
Copy link
Member
@bruceg bruceg commented May 23, 2025

Summary

Eliminated the "Source send cancelled." error and corresponding metric for the datadog_agent source, as Datadog Agent will always resend events when the connection is dropped after a timeout.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

How did you test this PR?

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the "no-changelog" label to this PR.

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • The CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • cargo fmt --all
      • cargo clippy --workspace --all-targets -- -D warnings
      • cargo nextest run --workspace (alternatively, you can run cargo test --all)
      • ./scripts/check_changelog_fragments.sh
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run cargo vdev build licenses to regenerate the license inventory and commit the changes (if any). More details here.

@bruceg bruceg requested review from pront and Copilot May 23, 2025 19:12
@bruceg bruceg requested a review from a team as a code owner May 23, 2025 19:12
@bruceg bruceg added type: bug A code related bug. source: datadog_agent Anything `datadog_agent` source related labels May 23, 2025
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR silences the "Source send cancelled." error and its corresponding metric for the datadog_agent source by disabling the unsent event counting behavior.

  • Updated datadog_agent source to call silence_unsent_events() on the SourceSender.
  • Refactored UnsentEventCount in SourceSender to optionally count events using an Option.
  • Added a changelog fragment to document the change.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/sources/datadog_agent/mod.rs Modified the warp filter builder to mute the unsent event count error by silencing events.
src/source_sender/mod.rs Added silence_unsent_events() and refactored UnsentEventCount to optionally disable counting.
changelog.d/fix-datadog-agent-source-sender-warning.fix.md Provided a changelog entry summarizing the fix.

@github-actions github-actions bot added the domain: sources Anything related to the Vector's sources label May 23, 2025
@bruceg bruceg force-pushed the bruceg/OPA-3143-datadog-agent branch from 5ad705c to e64b9bc Compare May 23, 2025 19:14
@datadog-vectordotdev
Copy link
datadog-vectordotdev bot commented May 23, 2025

Datadog Report

Branch report: bruceg/OPA-3143-datadog-agent
Commit report: 216ae08
Test service: vector

❌ 1 Failed (1 Known Flaky), 7 Passed, 0 Skipped, 25.47s Total Time

❌ Failed Tests (1)

  • datadog::logs::validate - vector::e2e - ❄️ Known flaky - Details

    Expand for error
     Test has failed
    

@bruceg bruceg enabled auto-merge May 26, 2025 16:17
@bruceg
Copy link
Member Author
bruceg commented May 26, 2025

This is reliably breaking the datadog-logs E2E test. It appears that the agent-vector configuration is not delivering logs to Vector, but I can't see why. I have reproduced it on my system, though trying the same test current master also fails, so I have no idea where to go on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: sources Anything related to the Vector's sources source: datadog_agent Anything `datadog_agent` source related type: bug A code related bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0