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

Log-only sources can't output metrics with the influxdb decoder #21039

Closed
jorgehermo9 opened this issue Aug 10, 2024 · 0 comments · Fixed by #21040
Closed

Log-only sources can't output metrics with the influxdb decoder #21039

jorgehermo9 opened this issue Aug 10, 2024 · 0 comments · Fixed by #21040
Labels
domain: codecs Anything related to Vector's codecs (encoding/decoding) type: bug A code related bug.

Comments

@jorgehermo9
Copy link
Contributor

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

Problem

As discussed in #21027, log-only sources (for example, the exec source) should be capable of emitting metrics with a decoder that does not include logs in its output (currently, the influxdb decoder is the only one with this behavior).

Configuration

sources:
  file:
    type: exec
    command: ["cat", "sampling.txt"]
    decoding:
      codec: "influxdb"
    mode: streaming
sinks:
  console:
    type: console
    inputs: ["file"]
    encoding:
      codec: "json"

Version

vector 0.40.0 (x86_64-unknown-linux-gnu)

Debug Output

2024-08-10T09:58:45.063500Z DEBUG vector::app: Internal log rate limit configured. internal_log_rate_secs=10
2024-08-10T09:58:45.063519Z  INFO vector::app: Log level is enabled. level="trace"
2024-08-10T09:58:45.063538Z DEBUG vector::app: messaged="Building runtime." worker_threads=20
2024-08-10T09:58:45.064633Z  INFO vector::app: Loading configs. paths=["config.yaml"]
2024-08-10T09:58:45.066867Z DEBUG vector::config::loading: No secret placeholder found, skipping secret resolution.
thread 'main' panicked at lib/vector-core/src/config/mod.rs:128:9:
assertion failed: ty.contains(DataType::Log)
stack backtrace:
   0:     0x6081905123a5 - <unknown>
   1:     0x60819054364b - <unknown>
   2:     0x60819050c57f - <unknown>
   3:     0x60819051217e - <unknown>
   4:     0x608190513c79 - <unknown>
   5:     0x6081905139bd - <unknown>
   6:     0x608190514113 - <unknown>
   7:     0x608190513fbb - <unknown>
   8:     0x608190512869 - <unknown>
   9:     0x608190513d27 - <unknown>
  10:     0x60818b96b9b3 - <unknown>
  11:     0x60818b96ba5c - <unknown>
  12:     0x60818f4e671b - <unknown>
  13:     0x60818bbc35d7 - <unknown>
  14:     0x60818c639b24 - <unknown>
  15:     0x60818bfaae47 - <unknown>
  16:     0x60818c55561f - <unknown>
  17:     0x60818c550ec9 - <unknown>
  18:     0x60818df6b284 - <unknown>
  19:     0x60818df8cff6 - <unknown>
  20:     0x60818df006d9 - <unknown>
  21:     0x60818c4a840f - <unknown>
  22:     0x60818d667608 - <unknown>
  23:     0x60818d667059 - <unknown>
  24:     0x60818d666d91 - <unknown>
  25:     0x60818d666c49 - <unknown>
  26:     0x60818b96f082 - <unknown>
  27:     0x60818b96f3f6 - <unknown>
  28:     0x60818b96f40c - <unknown>
  29:     0x6081905011c0 - <unknown>
  30:     0x60818b96f2d4 - <unknown>
  31:     0x76ac681a2e08 - <unknown>
  32:     0x76ac681a2ecc - __libc_start_main
  33:     0x60818b96df45 - <unknown>
  34:                0x0 - <unknown>

Example Data

No response

Additional Context

No response

References

No response

@jorgehermo9 jorgehermo9 added the type: bug A code related bug. label Aug 10, 2024
@jszwedko jszwedko added the domain: codecs Anything related to Vector's codecs (encoding/decoding) label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: codecs Anything related to Vector's codecs (encoding/decoding) type: bug A code related bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants