Skip to content
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

OTEL Collector: allow plain json payloads #580

Open
rauanmayemir opened this issue Aug 2, 2024 · 4 comments
Open

OTEL Collector: allow plain json payloads #580

rauanmayemir opened this issue Aug 2, 2024 · 4 comments

Comments

@rauanmayemir
Copy link
Contributor

I'm using vector.dev for collecting kubernetes logs and attempted to route cnpg cluster logs to pganalyze collector.

However, vector doesn't support proper OTLP sink, so initially I thought I could send plain otlp 'flavored' json as http payload, but pganalyze collector refused after failing to unmarshal protobuf.

@lfittl
Copy link
Member

lfittl commented Aug 2, 2024

@rauanmayemir Thanks for the report!

Could you share your vector configuration you're using? (with any credentials/identifying information removed) -- that makes it easier to verify on our end what needs to be done.

Also if you could share the specific error message from the collector that would be helpful.

@rauanmayemir
Copy link
Contributor Author

@lfittl I prepared a vector test repro, will send pganalyze request/response later. https://gist.github.com/rauanmayemir/d1a22a6e71b79c45c4854fa6db8a01df

vector test ./test_cnpg.toml

Warning log will show the output json payload that goes into pganalyze.

@rauanmayemir
Copy link
Contributor Author

No matter what I try to send to the /v1/logs endpoint, this is the error collector returning to me:

E Could not unmarshal otel body

The handler is trying to parse the logs data from binary:

if err := proto.Unmarshal(b, logsData); err != nil {

I can create a json of the logsData structure and wrap my log entry into 'resource_logs->scope_logs->log_records', but handler has to understand that payload is not binary data.

@rauanmayemir
Copy link
Contributor Author

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants