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

Add OTel collector log file #806

Merged
merged 9 commits into from
Sep 10, 2024
Merged

Add OTel collector log file #806

merged 9 commits into from
Sep 10, 2024

Conversation

dhurley
Copy link
Collaborator

@dhurley dhurley commented Aug 26, 2024

Proposed changes

Add OTel collector log file

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@dhurley dhurley self-assigned this Aug 26, 2024
@github-actions github-actions bot added the chore Pull requests for routine tasks label Aug 26, 2024
@dhurley dhurley added the v3.x Issues and Pull Requests related to the major version v3 label Aug 26, 2024
@@ -19,7 +20,10 @@ import (
"go.opentelemetry.io/collector/otelcol"
)

const maxTimeToWaitForShutdown = 30 * time.Second
const (
maxTimeToWaitForShutdown = 30 * time.Second
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a config setting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think so. We will try to wait for the otel collector to shutdown gracefully but if it takes too long we will log the issue and continue the code execution.

@oliveromahony
Copy link
Contributor

do we need a rotation policy to be added to the docs for this? like https://docs.nginx.com/nginx-agent/configuration/configuration-overview/#log-rotation

Comment on lines 83 to 84
RUN mkdir /var/run/nginx-agent/
RUN mkdir /var/log/nginx-agent/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can change to a single line?

Suggested change
RUN mkdir /var/run/nginx-agent/
RUN mkdir /var/log/nginx-agent/
RUN mkdir /var/log/nginx-agent/ /var/log/nginx-agent/

@dhurley
Copy link
Collaborator Author

dhurley commented Sep 10, 2024

do we need a rotation policy to be added to the docs for this? like https://docs.nginx.com/nginx-agent/configuration/configuration-overview/#log-rotation

That policy will cover the otel logs as well since its a regex that is used /var/log/nginx-agent/*.log

@oliveromahony
Copy link
Contributor

oliveromahony commented Sep 10, 2024

do we need a rotation policy to be added to the docs for this? like https://docs.nginx.com/nginx-agent/configuration/configuration-overview/#log-rotation

That policy will cover the otel logs as well since its a regex that is used /var/log/nginx-agent/*.log

maybe an update to the docs to say that NGINX Agent and OTel logs are included as part of the policy? Just so the customers aren't surprised they got a bonus log file all of a sudden

@dhurley dhurley merged commit 1922d79 into v3 Sep 10, 2024
21 checks passed
@dhurley dhurley deleted the write-otel-collector-logs-to-disk branch September 10, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks v3.x Issues and Pull Requests related to the major version v3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants