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

Support ingesting OpenTelemetry metrics #17309

Open
Tracked by #1444
spencergilbert opened this issue May 4, 2023 · 16 comments
Open
Tracked by #1444

Support ingesting OpenTelemetry metrics #17309

spencergilbert opened this issue May 4, 2023 · 16 comments
Labels
domain: metrics Anything related to Vector's metrics events source: opentelemetry Anything `opentelemetry` source related type: enhancement A value-adding code change that enhances its existing functionality.

Comments

@spencergilbert
Copy link
Contributor

spencergilbert commented May 4, 2023

Ref: #16121

@spencergilbert spencergilbert added type: enhancement A value-adding code change that enhances its existing functionality. domain: metrics Anything related to Vector's metrics events source: opentelemetry Anything `opentelemetry` source related labels May 4, 2023
@pront pront self-assigned this Sep 7, 2023
@arendjr
Copy link

arendjr commented Sep 8, 2023

I was just trying out Vector for a PoC and was bumped to see it didn't support OTLP metrics yet, but now I'm happy to see you self-assigned, @pront :) Does this mean we can look forward to this soon?

@pront
Copy link
Member

pront commented Sep 8, 2023

Hi @arendjr, yes, I will be working on this in the following weeks!

@pront pront removed their assignment Sep 19, 2023
@pront
Copy link
Member

pront commented Sep 19, 2023

Quick update, unfortunately this has been put on hold for now. We will update this issue if something changes.

@arendjr
Copy link

arendjr commented Sep 20, 2023

Too bad. Do you think it’s something that could be reasonably picked up by an outside contributor? If you have some pointers, I might have a chance to look at it.

@gaby
Copy link

gaby commented Dec 14, 2023

Any updates or alternatives for this?

@gaby
Copy link

gaby commented Mar 8, 2024

@pront Any updates on this?

@pront
Copy link
Member

pront commented Mar 8, 2024

@pront Any updates on this?

Hi @gaby, no. Nothing from me. I am focusing on logs only at the moment.

RFCs and contributions are most welcome.

@mayanksingh2298
Copy link

Why can't I simply use the http sink in vector to send json encoded data to otel http endpoint?

@gaby
Copy link

gaby commented May 14, 2024

@mayanksingh2298 I think you can as long as both sides support OTEL via HTTP ?

@mayanksingh2298
Copy link

otel definitely does: https://github.com/open-telemetry/opentelemetry-proto/blob/main/examples/README.md

I can configure my source to do so.
For some reason I'm getting a 400 Bad request in vector http sink.

Any tips on debugging this?

@gaby
Copy link

gaby commented May 14, 2024

Probably something with the encoding, I havent tried this this yet. Default method is POST in Vector

@mayanksingh2298
Copy link

mayanksingh2298 commented May 14, 2024

I used tcpdump to analyze the requests. Turns out vector sends an array [{},...] of jsons but otel collector expects a single json.

I followed this comment by @EdMcBane #3378 (comment) and it helped me out.

@mayanksingh2298
Copy link

In summary this is my workaround config to send otel traces (also works with other telemetry) to an otel collector.

sinks:
  sink_internal_otel_collector:
    type: http
    request:
      headers:
        Content-Type: application/json
    encoding:
      codec: json
    uri: http://localhost:4318/v1/traces
    batch:
      max_size: 1
    framing:
      method: newline_delimited
    inputs:
    - source_FluentD_log_httpnew 

sources:
  source_FluentD_log_httpnew:
    address: 0.0.0.0:49153
    decoding:
      codec: json
    framing:
      method: bytes
    type: http_server

Hopefully this helps someone

@gaby
Copy link

gaby commented May 14, 2024

@mayanksingh2298 Thanks for sharing, you could also split by newline in a separate step, but yours should work too

@CmdrSharp
Copy link

Is there any work being done on this? I feel like the limitations on receiving and sending OpenTelemetry-data is a tad problematic. I'm happy to try to look into this myself, but it'd be helpful to understand why progress was halted initially

@jszwedko
Copy link
Member

Is there any work being done on this? I feel like the limitations on receiving and sending OpenTelemetry-data is a tad problematic. I'm happy to try to look into this myself, but it'd be helpful to understand why progress was halted initially

I think the challenge will be mapping OTLP to Vector's internal data model (which might require expanding Vector's internal data model). This is a fairly broad change which is why it hasn't happened just yet, though I recognize OTLP support is particularly important for a tool like Vector and so we will get there eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: metrics Anything related to Vector's metrics events source: opentelemetry Anything `opentelemetry` source related type: enhancement A value-adding code change that enhances its existing functionality.
Projects
None yet
Development

No branches or pull requests

7 participants