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 on Agent Startup based on configuration #681

Merged
merged 8 commits into from
May 22, 2024

Conversation

oliveromahony
Copy link
Contributor

Proposed changes

Add an embedded OTel Collector to NGINX Agent

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

@github-actions github-actions bot added chore Pull requests for routine tasks dependencies labels May 20, 2024
Copy link

netlify bot commented May 20, 2024

Deploy Preview for agent-public-docs canceled.

Name Link
🔨 Latest commit 42e7f10
🔍 Latest deploy log https://app.netlify.com/sites/agent-public-docs/deploys/664e0bf02f493700088cf27b

Copy link
Contributor

@olli-holmala olli-holmala left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Collaborator

@dhurley dhurley left a comment

Choose a reason for hiding this comment

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

Should everything here be in a metrics package? We want to move away from having a plugins package so can we move plugin/otel_collector.go to the collector package and rename it to otel_collector_plugin.go?

internal/plugin/plugin_manager.go Outdated Show resolved Hide resolved
internal/plugin/otel_collector.go Outdated Show resolved Hide resolved
type (
// Collector The OTel collector plugin start an embedded OTel collector for metrics collection in the OTel format.
Collector struct {
svc *otelcol.Collector
Copy link
Collaborator

Choose a reason for hiding this comment

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

whats svc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the running service? Collector.collector seemed incorrect. What would you prefer?

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh right it wasn't obvious to me what svc meant. Could it be called just service?

internal/plugin/otel_collector.go Outdated Show resolved Hide resolved
@oliveromahony oliveromahony merged commit be42c5c into v3 May 22, 2024
14 checks passed
@oliveromahony oliveromahony deleted the embeded-otel-col branch May 22, 2024 15:25
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 dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants