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

Added Readme file for otel #3992

Merged
merged 23 commits into from
Jan 3, 2024
Merged

Conversation

michalpristas
Copy link
Contributor

Added README file for otel.
README is dynamically re-generated when dependencies are changed.

mage otelReadme
will parse dependencies and regenerate output file.

command is also part of mage update or mage check

Fixes: #3851

@michalpristas michalpristas added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Elastic-Agent Label for the Agent team backport-skip skip-changelog labels Jan 3, 2024
@michalpristas michalpristas self-assigned this Jan 3, 2024
@michalpristas michalpristas requested a review from a team as a code owner January 3, 2024 11:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

magefile.go Outdated
return tmpl.Execute(out, data)
}

func getDependencies() (receivers, exporters, processors []dependency, err error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This function is OTel specific so maybe rename it to reflect that?

Copy link
Contributor

@ycombinator ycombinator Jan 3, 2024

Choose a reason for hiding this comment

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

Consider parsing out extensions as well, e.g. github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension

magefile.go Outdated
}
}

readFile.Close()
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe move this to a defer statement right after the the file is opened? That way, we close the file handle even if we return early from this function because of an error.

magefile.go Outdated
}
}

func OtelReadme() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't say as of now if we'll end up with more OTel-specific mage targets, but if I had to guess I would say we would. So it might be a good idea to namespace all OTel-specific targets with otel:? So this target would then become otel:readme.

magefile.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for adding the README and the automation for keeping it up to date!

Copy link

Quality Gate passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No Coverage information No data about Coverage
No Duplication information No data about Duplication

See analysis details on SonarQube

@cmacknz
Copy link
Member

cmacknz commented Jan 3, 2024

I would link to this from a new section in https://github.com/elastic/elastic-agent/blob/main/README.md

@michalpristas michalpristas merged commit 3a3d31c into elastic:main Jan 3, 2024
9 checks passed
cmacknz pushed a commit to cmacknz/elastic-agent that referenced this pull request Jan 8, 2024
Added README file for otel.
README is dynamically re-generated when dependencies are changed.

mage otelReadme
will parse dependencies and regenerate output file.

command is also part of mage update or mage check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip skip-changelog Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[OTel] Create README.md in otel package folder
4 participants