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

Agent Config Changes: rename & update config_dirs & update exclude_logs #882

Merged
merged 8 commits into from
Oct 7, 2024

Conversation

aphralG
Copy link
Contributor

@aphralG aphralG commented Oct 2, 2024

Proposed changes

Rename config_dirs to allowed_directories in the agent config.
Change allowed_directories & exclude_logs to be an array of strings instead of a string in the agent config.
Renamed GetDefaultFeatures() to DefaultFeatures()
Change treat_warnings_as_errors default to false

Allowed Directories
Previous

config_dirs: "/etc/nginx:/usr/local/etc/nginx:/usr/share/nginx/modules:/var/run/nginx:/var/log/nginx"

Updated

allowed_directories: 
    - /etc/nginx
    - /usr/local/etc/nginx
    - /usr/share/nginx/modules
    - /var/run/nginx
    - /var/log/nginx

Exclude Logs
Previous

exclude_logs: "/var/log/nginx/error.log:/var/log/nginx/access.log"

Updated

exclude_logs: 
            - /var/log/nginx/error.log
            - /var/log/nginx/access.log

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

@aphralG aphralG self-assigned this Oct 2, 2024
@aphralG aphralG requested a review from a team as a code owner October 2, 2024 09:27
@github-actions github-actions bot added the chore Pull requests for routine tasks label Oct 2, 2024
@aphralG aphralG changed the title Agent Config Changes: rename & update config_dirs & update exclude _ogs Agent Config Changes: rename & update config_dirs & update exclude_logs Oct 2, 2024
@aphralG aphralG merged commit e858c4a into v3 Oct 7, 2024
20 checks passed
@aphralG aphralG deleted the rename-config-dirs-agent-config branch October 7, 2024 14:26
sean-breen added a commit that referenced this pull request Oct 21, 2024
* add attribute processor to config, handle resource update to get id

* write configuration before reloading

* update template file handling of attributes processor

* add attribute processor to mock config

* add more nil checks for attribute processor

* fix linting errors

* commit generated files

* fix debug exporter in template

* Use slice of Actions in Attributes processor

* fix lint: tag alignment

* remove docker login, use prod container repo for OSS nginx

* add unit test for processing ResourceUpdateTopic

* Update mdatagen install instructions in README.md (#887)

* Update go version to 1.23 (#865)

* Agent Config Changes: rename & update config_dirs & update exclude_logs  (#882)

* max api version (#880)

* add log to inetgration test (#893)

* add lock for restarting OTel collector

* fix struct alignment

* new proto defs

* resource-id -> resource.id

* fix lint: remove trailing newline

* fix unit test

* add unit test for negative case

* address pr feedback

* add updateResourceAttributes function + unit tests

* add nolint for cognitive-complexity, pending review

* fix nolint

* more feedback

* fix test condition

* PR feedback

---------

Co-authored-by: Donal Hurley <[email protected]>
Co-authored-by: oliveromahony <[email protected]>
Co-authored-by: aphralG <[email protected]>
sean-breen added a commit that referenced this pull request Oct 24, 2024
* add attribute processor to config, handle resource update to get id

* write configuration before reloading

* update template file handling of attributes processor

* add attribute processor to mock config

* add more nil checks for attribute processor

* fix linting errors

* commit generated files

* fix debug exporter in template

* Use slice of Actions in Attributes processor

* fix lint: tag alignment

* remove docker login, use prod container repo for OSS nginx

* add unit test for processing ResourceUpdateTopic

* Update mdatagen install instructions in README.md (#887)

* Update go version to 1.23 (#865)

* Agent Config Changes: rename & update config_dirs & update exclude_logs  (#882)

* max api version (#880)

* add log to inetgration test (#893)

* add lock for restarting OTel collector

* fix struct alignment

* new proto defs

* resource-id -> resource.id

* fix lint: remove trailing newline

* fix unit test

* add unit test for negative case

* address pr feedback

* add updateResourceAttributes function + unit tests

* add nolint for cognitive-complexity, pending review

* fix nolint

* more feedback

* fix test condition

* add resource for each scraper

* adding instance id to otel metadata config

* PR feedback

* add instance id and type to nginxplus receiver otel resource

* add instance id and type to otel resource
 - nginx oss log scraper
 - nginx oss stub status scraper
 - nginx plus api scraper

* fix lint errors

* run gofumpt

* update go.mod

* remove comment

* Fix unit test expected files

* increase timeout by 1 sec

* format

* nginx.instance.* to instance.*

* PR feedback

* increase timeout values for collector plugin test

* Update internal/collector/nginxplusreceiver/scraper.go

Co-authored-by: Donal Hurley <[email protected]>

* Update internal/collector/nginxossreceiver/internal/scraper/stubstatus/stub_status_scraper.go

Co-authored-by: Donal Hurley <[email protected]>

* Update internal/collector/nginxossreceiver/internal/scraper/accesslog/nginx_log_scraper.go

Co-authored-by: Donal Hurley <[email protected]>

---------

Co-authored-by: Donal Hurley <[email protected]>
Co-authored-by: oliveromahony <[email protected]>
Co-authored-by: aphralG <[email protected]>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants