Skip to content

Enhance Axiom sink to support traces #22933

@darach

Description

@darach

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)

Metadata

Metadata

Assignees

Labels

type: featureA value-adding code addition that introduce new functionality.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions