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

[receiver/file] logs and traces are not supported #27682

Closed
andrzej-stencel opened this issue Oct 16, 2023 · 2 comments · Fixed by #27684
Closed

[receiver/file] logs and traces are not supported #27682

andrzej-stencel opened this issue Oct 16, 2023 · 2 comments · Fixed by #27684
Assignees
Labels
bug Something isn't working receiver/file

Comments

@andrzej-stencel
Copy link
Member

Component(s)

receiver/file

What happened?

Description

The README (and the metadata) claims that the File receiver supports logs, metrics and traces, but it looks like it currently only supports metrics.

Steps to Reproduce

Run collector with the below config

Expected Result

Debug exporter reports logs.

Actual Result

Error: failed to build pipelines: failed to create "file" receiver for data type "logs": telemetry type is not supported

Same thing happens with traces.

Collector version

v0.87.0

Environment information

No response

OpenTelemetry Collector configuration

receivers:
  file:
    path: ./logs-in-otlp-json-format-from-file-exporter.json

exporters:
  debug:

service:
  pipelines:
    logs:
      exporters:
      - debug
      receivers:
      - file

Log output

$ otelcol-contrib-0.87.0-linux_amd64 --config config.yaml 
2023-10-16T13:43:21.728+0200    info    service@v0.87.0/telemetry.go:84 Setting up own telemetry...
2023-10-16T13:43:21.729+0200    info    service@v0.87.0/telemetry.go:201        Serving Prometheus metrics      {"address": ":8888", "level": "Basic"}
2023-10-16T13:43:21.729+0200    info    exporter@v0.87.0/exporter.go:275        Development component. May change in the future.        {"kind": "exporter", "data_type": "logs", "name": "debug"}
2023-10-16T13:43:21.729+0200    info    receiver@v0.87.0/receiver.go:296        Stability level of component is undefined       {"kind": "receiver", "name": "file", "data_type": "logs"}
Error: failed to build pipelines: failed to create "file" receiver for data type "logs": telemetry type is not supported
2023/10/16 13:43:21 collector server run finished with error: failed to build pipelines: failed to create "file" receiver for data type "logs": telemetry type is not supported

Additional context

I wonder what the roadmap for this receiver is: is it supposed to be superseded by a regular file reading receiver like Filelog receiver and the encoding extensions?

@andrzej-stencel andrzej-stencel added bug Something isn't working needs triage New item requiring triage labels Oct 16, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member

Regarding this issue
Agreed this is a valid issue, it's clear from the NewFactory implementation.

Some more investigation, it looks like the original plan was to support metrics, traces and logs. The original PR (#16827) introducing the receiver skeleton also indicated the plan was to support all 3 (in the README's support table).

However, the text of the README from the original PR is still in place today, and seems to indicate that metrics are the only ones supported, so the README conflicts internally.

I think for now the best option is to update the metadata.yaml to properly indicate logs and traces aren't supported, with the understanding that maybe some day support would be added.

Regarding additional comments
It looks like the original intention of this was purely for consuming the output of the fileexporter, but I'm not sure how it fits in with other components now. I'll let someone else with more context weigh in there.

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Oct 16, 2023
@crobert-1 crobert-1 self-assigned this Oct 16, 2023
djaglowski pushed a commit that referenced this issue Oct 16, 2023
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
Logs and traces are not supported telemetry types for the file receiver,
and the collector will fail to start if it the receiver is in included
in a pipeline of either of these types. This change is to correct the
README to properly reflect this.

**Link to tracking Issue:** <Issue number if applicable>
Resolves #27682

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
JaredTan95 pushed a commit to openinsight-proj/opentelemetry-collector-contrib that referenced this issue Oct 18, 2023
…try#27684)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
Logs and traces are not supported telemetry types for the file receiver,
and the collector will fail to start if it the receiver is in included
in a pipeline of either of these types. This change is to correct the
README to properly reflect this.

**Link to tracking Issue:** <Issue number if applicable>
Resolves open-telemetry#27682

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this issue Nov 12, 2023
…try#27684)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
Logs and traces are not supported telemetry types for the file receiver,
and the collector will fail to start if it the receiver is in included
in a pipeline of either of these types. This change is to correct the
README to properly reflect this.

**Link to tracking Issue:** <Issue number if applicable>
Resolves open-telemetry#27682

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working receiver/file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants