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

[outreachy] Add more quick installations to the registry #5330

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mercybassey
Copy link
Contributor

@mercybassey mercybassey commented Oct 5, 2024

This pull request fixes #5308 and adds quick installation for okHTTP Instrumentation

@mercybassey mercybassey requested a review from a team as a code owner October 5, 2024 16:50
@mercybassey
Copy link
Contributor Author

@svrnm am I supposed to make a change in quick install? I followed the same format in the entry.html however, it's showing compose require opentelemetry-instrumentation-okhttp instead of mvn install --. Additionally the the font awesome icon I added is not showing. Below is my output locally:

okhttp

I would appreciate your guidance on this. Thanks.

@mercybassey
Copy link
Contributor Author

@svrnm am I supposed to make a change in quick install? I followed the same format in the entry.html however, it's showing compose require opentelemetry-instrumentation-okhttp instead of mvn install --. Additionally the the font awesome icon I added is not showing. Below is my output locally:

okhttp

I would appreciate your guidance on this. Thanks.

Also the spelling check job is failing, did I do something wrong?

@svrnm svrnm changed the title Add more quick installations to the registry [outreachy] Add more quick installations to the registry Oct 7, 2024
@svrnm svrnm added the outreachy Issues for Outreachy Participants label Oct 7, 2024
@svrnm
Copy link
Member

svrnm commented Oct 7, 2024

hey @mercybassey, good start!

first of all, do not worry about the spell checker or any other issues, as long as the preview builds we are fine:

https://deploy-preview-5330--opentelemetry.netlify.app/

Let me take a look why it shows composer and not mvn

@svrnm
Copy link
Member

svrnm commented Oct 7, 2024

@mercybassey
Copy link
Contributor Author

https://deploy-preview-5330--opentelemetry.netlify.app/ecosystem/registry/?s=okhttp&component=&language=

works in the preview, maybe some local caching issue

@svrnm I ran npm run build again, and then npm run serve and It worked. Here's my output locally:
okhttp1

@@ -46,6 +46,11 @@
"installLine" "cargo add %s"
"installTemplate" "ecosystem/registry/quickinstall/default.md"
"icon" "fab fa-rust")
"maven" (dict
"urlPattern" "https://central.sonatype.com/%s"
"installLine" "mvn install %s"
Copy link
Member

Choose a reason for hiding this comment

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

mvn install does something different (https://maven.apache.org/plugins/maven-install-plugin/), what you will need to show is the snippet that someone needs to add to the pom.xml to add the dependency, here

<dependency>
    <groupId>io.opentelemetry.instrumentation</groupId>
    <artifactId>opentelemetry-okhttp-3.0</artifactId>
    <version>2.8.0-alpha</version>
</dependency>

To accomplish that you will need a custom file in quickinstall, check the hex.md and collector.md how that can be done.

I suggest that for the name of the package you use io.opentelemetry.instrumentation/opentelemetry-okhttp-3.0, that way the link will be correct. Note that you will face a challenge then with the XML file, since you need to split that name by the / to distribute it across groupId and artifactId. Hugo has a split function for that.

@mercybassey
Copy link
Contributor Author

@svrnm I noticed that the package information can be accessed using .<key> just like it was used in collector.md and hex.md and Hugo's split function uses a delimiter to separate strings and present them in the form of lists. Since the package name is io.opentelemetry.instrumentation/opentelemetry-okhttp-3.0 the spilt function converts it to ["io.opentelemetry.instrumentation", "opentelemetry-okhttp-3.0"] with \ as the delimiter.

Using Go's index function I was able to represent io.opentelemetry.instrumentation as the groupID and opentelemetry-okhttp-3.0 as the artifactID; and then reference it in entry.html. Below is my output locally:

okhttp2

I also removed installLine since it was doing something else.

@svrnm
Copy link
Member

svrnm commented Oct 7, 2024

great work 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
outreachy Issues for Outreachy Participants registry
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

[outreachy] Registry: add more quick installations to the registry
2 participants