Skip to content

Conversation

@matthijskooijman
Copy link
Contributor

Summary

This documents the output type (metric/logs/traces) generated by each decoder, based out the output_type methods in the decoder. Previously, this was only documented for the decoders that generated multiple types, but not for the ones that only generate logs or metrics.

How did you test this PR?

Used make generate-component-doc to regenerate cue files (which I presume is the right thing to do for such a change, but it does not seem to be documented in CONTRIBUTING.md or other places I looked). Did not see how to generate actual HTML to see if the result looks ok.

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.

@matthijskooijman matthijskooijman requested review from a team as code owners January 28, 2026 13:30
@github-actions github-actions bot added the domain: external docs Anything related to Vector's external, public documentation label Jan 28, 2026
This also includes updated website cue files, generated with `make generate-component-doc`.
@matthijskooijman matthijskooijman force-pushed the document-decoder-output-types branch from 90ca889 to 5105f52 Compare January 28, 2026 13:32
@matthijskooijman matthijskooijman changed the title docs(decoding): Document the output type of each decoder docs(codecs): Document the output type of each decoder Jan 28, 2026
@matthijskooijman
Copy link
Contributor Author

One more thing, that I noticed while creating this PR: The OTLP codec is documented to support all three output types, and also seems to have code for all three, but seems to only advertise two of them in the code:

/// Return the type of event build by this deserializer.
pub fn output_type(&self) -> DataType {
DataType::Log | DataType::Trace
}

I have not idea what this means, but it seems inconsistent and maybe a bug?

@pront
Copy link
Member

pront commented Jan 28, 2026

One more thing, that I noticed while creating this PR: The OTLP codec is documented to support all three output types, and also seems to have code for all three, but seems to only advertise two of them in the code:

/// Return the type of event build by this deserializer.
pub fn output_type(&self) -> DataType {
DataType::Log | DataType::Trace
}

I have not idea what this means, but it seems inconsistent and maybe a bug?

This is a documented limitation:

https://vector.dev/docs/reference/configuration/sources/opentelemetry/#otlp-decoding-usage

However, OTLP formatted metrics cannot be converted to Vector’s metrics format. As a workaround, the OTLP metrics are converted to Vector log events while preserving the OTLP format. This prohibits the use of metric transforms like aggregate but it enables easy shipping to OTEL collectors.

More context here in the comments here: #17310 (comment)

@matthijskooijman
Copy link
Contributor Author

Ok, thanks. I'm not sure that I understand completely, but that is fine :-)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants