← Back to Pull requests

refactor(amqp, heroku_logs sources): use const field names #27228

Open
itang06 opened this pull request with 118 lines diff across 2 files
View on GitHub
itang06 itang06 commented on Nov 17, 2026 13:23 UTC
Author

Summary

Replaces raw source-owned field-name strings in the amqp and heroku_logs sources with constants, following the pattern used in #27060:

  • amqp: TIMESTAMP, ROUTING, EXCHANGE, and OFFSET are reused across default paths, schema declarations, event insertion, and relevant tests.

  • heroku_logs: TIMESTAMP, HOST, APP_NAME, PROC_ID, and QUERY_PARAMETERS are reused across schema declarations, parsed legacy paths, event insertion, and relevant tests.
  • Field names and behavior remain unchanged. Vector-wide metadata names, configuration labels, and test data remain literal.

    References

    Related: #17225

    Vector configuration

    No configuration changes.

    How did you test this PR?

  • make fmt

  • FEATURES="sources-amqp sources-heroku_logs" make check-clippy

  • make test FEATURES="sources-amqp" SCOPE="sources::amqp": 3 passed

  • make test FEATURES="sources-heroku_logs" SCOPE="sources::heroku_logs": 11 passed
  • Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.

  • For a new deprecation announcement, follow the deprecation policy and add a deprecation.d/ notice instead.
  • No. A maintainer will apply the no-changelog label to this PR.
  • Contributor Guidelines

  • Please read our Vector contributor resources.

  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.

  • Before pushing, follow our pre-push guidance.

  • 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.

    Diff: 118 lines (+61 / -57) across 2 files Reviewer: pront Review duration: 14842m
    All Vouch review confidence checks passed
    Residual risk 0.05 = Change Risk (0.33) × (1 − Review Confidence (0.84)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.33 · 118 lines diff across 2 files
    0.33
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.79 · 1 substantive comment(s)
    0.79
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    83%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.286
    Real PR Conversation Timeline
    4 items
    chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] commented on Nov 17, 2026 13:23 UTC
    Bot

    <!-- codex-pull-request-review-summary -->
    <!-- codex-review-state:v1 {"code_review":{"commit_sha":"67fe6fa6595b7186ce66d3a98787a00ae3a5fa0d","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} -->

    <details>
    <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary>

    This comment shows the latest Codex review activity on this pull request.

    | Review | Status | Commit | Review trigger |
    | --- | --- | --- | --- |
    | 📝 Code Review | ✅ Completed <relative-time datetime="2026-11-17T13:26:27.717735Z">2026-11-17T13:26:27.717735Z</relative-time> | 67fe6fa | PR opened |

    <details> <summary>ℹ️ About Codex in GitHub</summary>
    <br/>

    Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review

  • Mark a draft as ready

  • Comment "@codex review" or "@codex security review".
  • Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

    </details>

    </details>

    datadoghq-integration[bot] datadoghq-integration[bot] commented on Nov 17, 2026 13:26 UTC
    Reviewer

    <img src="https://img.shields.io/badge/BITS%20CODE%20REVIEW-PASS-1a7f37?labelColor=632CA6&style=for-the-badge&logo=data:image/svg%2Bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjggMTI4Ij48cGF0aCBkPSJNNjMuNTUsNzQuMzJhNTUuMiw1NS4yLDAsMCwxLTEwLTguMzJjLS4zMS0uMjMtLjI2LTEuMjUtLjI2LTEuMjVBNTUuODEsNTUuODEsMCwwLDA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w5LjA5LTEzLjg4LDEwLjMzLDMsOC44OC0xNC44NCwxMC42NSw3LDguMS0xNywyLjg3LDMwLjkxWiIgZmlsbD0iI2ZmZiIvPjwvc3ZnPg%3D%3D" alt="Bits Code Review: PASS" height="36"/>

    <details>
    <summary>More details</summary>

    The constants preserve the existing field-name values and their behavior in path macros, keeping AMQP and Heroku source defaults, emitted metadata, and schema declarations aligned.

    </details>
    Was this helpful? React 👍 or 👎

    <sub>Open Bits AI session</sub>

    <sub>🤖 Bits Code Review · Commit 67fe6fa</sub>

    <!-- autotest-meta model=gpt-6.1-sol engine=codex reasoning_effort=high verdict=PASS ddrs_bucket=unknown session_id=5e3c1f8e-b9b0-45ee-972d-dbfd5aa58975 -->

    <!-- datadog-code-review reviewer-id=bad90057-5c12-4101-ad47-d91c9dff0f90 -->
    <!-- datadog-autotest:v1:prod -->
    <!-- datadog-autotest-delivery:v1:prod:337eab25a8303fbcb07f63bb5443c75da1963cc978cf1abee0f9da169275c086:bundle -->

    pront pront approved these changes on Nov 17, 2026 15:47 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    itang06 itang06
    Labels
    risk: low confidence: 83.9% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 33.1% (LOW) · Higher = larger blast radius
    33.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 83.9% · Lower = rushed or shallow review
    83.9%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 5.3% · Safe to merge
    5.3%