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

How to send 'A' collector logs to collector 'B' for self monitoring via 'service::telemetry::logs' #35308

Closed
vaibhhavv opened this issue Sep 20, 2024 · 7 comments
Labels
bug Something isn't working Stale

Comments

@vaibhhavv
Copy link

Component(s)

No response

What happened?

Description

I have two collectors 'A' & 'B'.
Use case is I want to send logs of collector 'A' to collector 'B' for self-monitoring, with the help of the otel pipelines itself.
I am little stuck as I have enabled the telemetry block for logs by the below configuration.

However, after enabling it I am still not getting any logs on collector 'B'.

service:
  telemetry:
    logs:
        level: debug

service::telemetry::logs documentation is very limited and I did not get any idea how to enable this feature.
Could some one help out here?

  1. For the particular use case, this is the correct approach? If not, could you suggest the correct one
  2. If yes, could you add what part I am missing here.

Steps to Reproduce

Expected Result

Actual Result

Collector version

0.93.3

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@vaibhhavv vaibhhavv added bug Something isn't working needs triage New item requiring triage labels Sep 20, 2024
@bacherfl
Copy link
Contributor

Hi @vaibhhavv - I was also just looking into this and it seems like while for metrics there is the possibility to directly send them to another collector via otlp, the self monitoring logs only provide the option to store the logs in a file, using the output_paths config option (see https://opentelemetry.io/docs/collector/internal-telemetry/#configure-internal-logs) and https://github.com/open-telemetry/opentelemetry-collector/blob/1e29f99536c300a877454b52ac372a91a6c05344/service/telemetry/config.go#L87

So with the following example, the logs would be stored in the file otelcol.log:

service:
  telemetry:
    logs:
      level: debug
      output_paths:
        - otelcol.log

One potential option to try out, provided that the log file generated by collector A is accessible by collector B, would be to then use the filelogreceiver to read the log file generated by collector A.

Copy link
Contributor

github-actions bot commented Dec 5, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

@github-actions github-actions bot added the Stale label Dec 5, 2024
@mowies
Copy link
Member

mowies commented Dec 5, 2024

@vaibhhavv FYI: there was an update to the docs in regards to this and also new features to be able to define a normal exporter for internal telemetry logs.
see open-telemetry/opentelemetry.io#5702

@vaibhhavv
Copy link
Author

Thanks @mowies for mentioning it. I would say many important use cases will be solved under this implementation. ❤️

@mowies
Copy link
Member

mowies commented Dec 5, 2024

Can this issue be closed with this new info?

@vaibhhavv
Copy link
Author

Yepp @mowies

@mowies
Copy link
Member

mowies commented Dec 5, 2024

/label -needs-triage

@github-actions github-actions bot removed the needs triage New item requiring triage label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

3 participants