Skip to content

feat(sink: xray) #22749: Add a Sink for AWS X-Ray. #22750

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 3 commits into
base: master
Choose a base branch
from

Conversation

johannesfloriangeiger
Copy link
Contributor

Summary

See title, adds a first version of the Sink for AWS X-Ray for #22749.

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?

Manually (AWS X-Ray is unfortunately a LocalStack Pro feature):

vector.toml

[sources.http_server]
type = "http_server"
address = "0.0.0.0:80"
encoding = "json"

[sinks.xray]
type = "xray"
inputs = ["http_server"]

trace.sh

#!/bin/zsh
START_TIME=$(date +%s)
HEX_TIME=$(printf '%x\n' $START_TIME)
GUID=$(dd if=/dev/random bs=12 count=1 2>/dev/null | od -An -tx1 | tr -d ' \t\n')
TRACE_ID="1-$HEX_TIME-$GUID"
ID=$(dd if=/dev/random bs=8 count=1 2>/dev/null | od -An -tx1 | tr -d ' \t\n')
echo $TRACE_ID
curl -d '{"trace_id": "'$TRACE_ID'", "id": "'$ID'", "start_time": '$START_TIME', "end_time": '$START_TIME', "name": "test.elasticbeanstalk.com"}' localhost:80

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.

Checklist

  • Please read our Vector contributor resources.
    • make check-all is a good command to run locally. This check is
      defined here. Some of these
      checks might not be relevant to your PR. For Rust changes, at the very least you should run:
      • cargo fmt --all
      • cargo clippy --workspace --all-targets -- -D warnings
      • cargo nextest run --workspace (alternatively, you can run cargo test --all)
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run dd-rust-license-tool write to regenerate the license inventory and commit the changes (if any). More details here.

References

@johannesfloriangeiger johannesfloriangeiger requested a review from a team as a code owner March 30, 2025 18:08
@github-actions github-actions bot added the domain: sinks Anything related to the Vector's sinks label Mar 30, 2025
Copy link
Member

@pront pront left a comment

Choose a reason for hiding this comment

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

Hi @johannesfloriangeiger, thanks for this contribution. It looks good. We will need some documentation files. See a recent example here (all files under website): https://github.com/vectordotdev/vector/pull/22609/files#diff-2d2f5bfaa29c6451fe72bf7b0408b9044f9652bf6cb43159fac277781814411a

Note that base/ is generated by make generate-component-docs

@johannesfloriangeiger johannesfloriangeiger requested a review from a team as a code owner May 17, 2025 16:51
@github-actions github-actions bot added the domain: external docs Anything related to Vector's external, public documentation label May 17, 2025
@johannesfloriangeiger
Copy link
Contributor Author

Hi @johannesfloriangeiger, thanks for this contribution. It looks good. We will need some documentation files. See a recent example here (all files under website): https://github.com/vectordotdev/vector/pull/22609/files#diff-2d2f5bfaa29c6451fe72bf7b0408b9044f9652bf6cb43159fac277781814411a

Note that base/ is generated by make generate-component-docs

Thanks, I've added some files but I am not sure if that's sufficient or if there's something missing, are you able to cross check that for me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: external docs Anything related to Vector's external, public documentation domain: sinks Anything related to the Vector's sinks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sink: AWS X-Ray
3 participants