Skip to content

Enhance Axiom sink to support traces #22933

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
darach opened this issue Apr 23, 2025 · 1 comment · May be fixed by #22935
Open

Enhance Axiom sink to support traces #22933

darach opened this issue Apr 23, 2025 · 1 comment · May be fixed by #22935
Assignees
Labels
type: feature A value-adding code addition that introduce new functionality.

Comments

@darach
Copy link
Contributor

darach commented Apr 23, 2025

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • PR in progress by issue author

Use Cases

The experimental support for the OpenTelemetry source adds trace data types to vector. This is
supported natively by vector's HTTP sink type. The axiom sink is based on the HTTP sink type but
currently fails with an error when it receives trace data:

➜ vector -c test.yaml
2025-04-23T12:11:13.056487Z  INFO vector::app: Log level is enabled. level="info"
2025-04-23T12:11:13.106462Z  INFO vector::app: Loading configs. paths=["test.yaml"]
2025-04-23T12:11:13.109104Z ERROR vector::cli: Configuration error. error=Data type mismatch between opentelemetry.traces (["Trace"]) and axiom (["Log", "Metric"])

The enhancement lifts this restriction by enabling trace type data for the axiom sink and propagating this
to the underlying HTTP sink.

Attempted Solutions

The HTTP sink can be used as a workaround and works great with the Vector OpenTelemetry source:

sinks:
  axiom:
    type: http
    inputs:
      - opentelemetry.traces
    compression: gzip
    encoding:
      codec: json
    uri: https://api.axiom.co/v1/datasets/darach_vector_otel_trace/ingest
    headers:
      Authorization: Bearer xaat-beefbeef-cafe-4444-cafe-feedfeedfeed

A small patch to the axiom sink will left the constraint to the log and metrics types enabling traces
and providing a simpler configuration experience to vector users who are propagating trace data.

Proposal

A small code change to the axiom sink is all that is needed to resolve, and a little testing:

impl SinkConfig for AxiomConfig {
    // ...
    fn input(&self) -> Input {
        Input::new(DataType::Metric | DataType::Log | DataType::Trace)
    }

References

No response

Version

vector 0.46.1 (x86_64-unknown-linux-gnu 9a19e8a 2025-04-14 18:36:30.707862743)

@darach darach added the type: feature A value-adding code addition that introduce new functionality. label Apr 23, 2025
@darach
Copy link
Contributor Author

darach commented Apr 23, 2025

Please assign to me @jszwedko , I have a PR tested and in progress! Also, might be worth reviewing other sinks based on http that might work with traces similar to Axiom. Its a fairly simple enhancement as above FWIW...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A value-adding code addition that introduce new functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant