Skip to content

feat(cli): add support for edge_attributes in graph configuration#24593

Merged
pront merged 10 commits intovectordotdev:masterfrom
esensar:feature/graph-edge-attributes
Mar 18, 2026
Merged

feat(cli): add support for edge_attributes in graph configuration#24593
pront merged 10 commits intovectordotdev:masterfrom
esensar:feature/graph-edge-attributes

Conversation

@esensar
Copy link
Copy Markdown
Contributor

@esensar esensar commented Feb 4, 2026

Summary

Adds support for edge_attributes besides node_attributes in graph configuration.

Vector configuration

The specifics of each component aren't important - just the graph fields.

enrichment_tables:
  memory_table:
    type: memory
    ttl: 60
    flush_interval: 5
    inputs: ["cache_generator"]
    graph:
      edge_attributes:
        cache_generator:
          label: "Load data into memory enrichment table"

sources:
  demo_logs_test:
    type: "demo_logs"
    format: "json"

transforms:
  demo_logs_processor:
    type: "remap"
    inputs: ["demo_logs_test"]
    source: |
      . = parse_json!(.message)
    graph:
      edge_attributes:
        demo_logs_test:
          label: "Load demo data into processor"

  cache_generator:
    type: "remap"
    inputs: ["demo_logs_processor"]
    source: |
      . = {}
    graph:
      edge_attributes:
        demo_logs_processor:
          label: "Prepare data for cache"

sinks:
  console:
    inputs: ["demo_logs_processor", "demo_logs_test"]
    target: "stdout"
    type: "console"
    encoding:
      codec: "json"

How did you test this PR?

Ran vector graph with the provided file:

digraph {
  "memory_table" [shape="cylinder"]
  "cache_generator" -> "memory_table" [label="Load data into memory enrichment table"]
  "demo_logs_test" [shape="trapezium"]
  "cache_generator" [shape="diamond"]
  "demo_logs_processor" -> "cache_generator" [label="Prepare data for cache"]
  "demo_logs_processor" [shape="diamond"]
  "demo_logs_test" -> "demo_logs_processor" [label="Load demo data into processor"]
  "console" [shape="invtrapezium"]
  "demo_logs_processor" -> "console"
  "demo_logs_test" -> "console"
}

Change Type

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

Is this a breaking change?

  • Yes
  • No

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.

References

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some 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:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • 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 make build-licenses to regenerate the license inventory and commit the changes (if any). More details here.

Sponsored by Quad9

@esensar esensar requested a review from a team as a code owner February 4, 2026 13:06
@esensar
Copy link
Copy Markdown
Contributor Author

esensar commented Feb 4, 2026

@vectordev/vector I have also noticed that memory enrichment tables weren't included in the graph output. Not sure if it makes sense to include them, but they have inputs and also outputs sometimes, so it seemed reasonable to add them.

@esensar esensar requested a review from a team as a code owner February 4, 2026 14:52
@github-actions github-actions Bot added the domain: external docs Anything related to Vector's external, public documentation label Feb 4, 2026
Comment thread src/graph.rs Outdated
Comment thread src/graph.rs Outdated
@esensar esensar requested a review from pront March 18, 2026 11:55
@pront
Copy link
Copy Markdown
Member

pront commented Mar 18, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0964561319

ℹ️ About Codex in GitHub

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

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/graph.rs Outdated
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

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

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pront pront enabled auto-merge March 18, 2026 15:30
auto-merge was automatically disabled March 18, 2026 18:07

Head branch was pushed to by a user without write access

@pront pront enabled auto-merge March 18, 2026 18:15
@pront pront added this pull request to the merge queue Mar 18, 2026
Merged via the queue into vectordotdev:master with commit 3093667 Mar 18, 2026
57 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 18, 2026
@esensar esensar deleted the feature/graph-edge-attributes branch March 19, 2026 08:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

domain: external docs Anything related to Vector's external, public documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add edge_attributes to graph output for graphviz and mermaid formats

3 participants