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

TRACING-4824: add a way to detect components support level in upstream #104

Closed

Conversation

iblancasa
Copy link
Contributor

Output example:

2024/10/17 12:36:23 Repository opentelemetry-collector does not exist, cloning...
2024/10/17 12:36:27 Checking out version 0.107.0 of opentelemetry-collector
2024/10/17 12:36:28 Repository opentelemetry-collector-contrib does not exist, cloning...
2024/10/17 12:37:07 Checking out version 0.107.0 of opentelemetry-collector-contrib
==========================================================
exporter
==========================================================
Component Name         |Traces Support  |Metrics Support  |Logs Support
debug                  |Development     |Development      |Development
logging                |Deprecated      |Deprecated       |Deprecated
otlp                   |Stable          |Stable           |Beta
otlphttp               |Stable          |Stable           |Beta
awscloudwatchlogs      |n/a             |n/a              |Beta
kafka                  |Beta            |Beta             |Beta
loadbalancing          |Beta            |Development      |Beta
loki                   |n/a             |n/a              |Deprecated
prometheus             |n/a             |Beta             |n/a
prometheusremotewrite  |n/a             |Beta             |n/a

==========================================================
processor
==========================================================
Component Name     |Traces Support  |Metrics Support  |Logs Support
batch              |Beta            |Beta             |Beta
memory_limiter     |Beta            |Beta             |Beta
attributes         |Beta            |Beta             |Beta
cumulativetodelta  |n/a             |Beta             |n/a
filter             |Alpha           |Alpha            |Alpha
groupbyattrs       |Beta            |Beta             |Beta
k8sattributes      |Beta            |Beta             |Beta
resourcedetection  |Beta            |Beta             |Beta
resource           |Beta            |Beta             |Beta
routing            |Beta            |Beta             |Beta
span               |Alpha           |n/a              |n/a
transform          |Alpha           |Alpha            |Alpha

==========================================================
receiver
==========================================================
Component Name  |Traces Support  |Metrics Support  |Logs Support
otlp            |Stable          |Stable           |Beta
filelog         |n/a             |n/a              |Beta
hostmetrics     |n/a             |Beta             |Development
jaeger          |Beta            |n/a              |n/a
journald        |n/a             |n/a              |Alpha
k8s_cluster     |n/a             |Beta             |Development
k8s_events      |n/a             |n/a              |Alpha
k8sobjects      |n/a             |n/a              |Beta
kafka           |Beta            |Beta             |Beta
kubeletstats    |n/a             |Beta             |n/a
opencensus      |Beta            |Beta             |n/a
otlpjsonfile    |Alpha           |Alpha            |Alpha
prometheus      |n/a             |Beta             |n/a
zipkin          |Beta            |n/a              |n/a

=================================================================================================================================================================
connectors
=================================================================================================================================================================
Component Name  |Traces to traces  |Traces to metrics  |Traces to logs  |Metrics to metrics  |Metrics to traces  |Metrics to logs  |Logs to logs  |Logs to traces  |Logs to metrics
forward         |Beta              |n/a                |n/a             |Beta                |n/a                |n/a              |Beta          |n/a             |n/a
count           |n/a               |Alpha              |n/a             |Alpha               |n/a                |n/a              |n/a           |n/a             |Alpha
routing         |Alpha             |n/a                |n/a             |Alpha               |n/a                |n/a              |Alpha         |n/a             |n/a
spanmetrics     |n/a               |Alpha              |n/a             |n/a                 |n/a                |n/a              |n/a           |n/a             |n/a

======================
extensions
======================
Component Name        |Support
memory_ballast        |Deprecated
memory_limiter        |Development
zpages                |Beta
bearertokenauth       |Beta
health_check          |Beta
jaegerremotesampling  |Alpha
oauth2client          |Beta
oidc                  |Beta
pprof                 |Beta
file_storage          |Beta

@iblancasa iblancasa force-pushed the add-component-parser branch from 67e4d17 to 024dcd5 Compare October 17, 2024 10:44
@iblancasa iblancasa force-pushed the add-component-parser branch from 024dcd5 to 181cf5d Compare October 17, 2024 10:45
Copy link
Member

@pavolloffay pavolloffay left a comment

Choose a reason for hiding this comment

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

go.mod is missing


if _, err := os.Stat(filepath.Join(pwd, repo)); os.IsNotExist(err) {
log.Printf("Repository %s does not exist, cloning...\n", repo)
err := exec.Command("git", "clone", fmt.Sprintf("https://github.com/open-telemetry/%s.git", repo)).Run()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we actually need to clone those repos? Could we not use the github api instead?

Pointing to some go.mod file should be should be sufficient to extract the information from the metadata.yaml files?

Copy link
Contributor Author

@iblancasa iblancasa Oct 17, 2024

Choose a reason for hiding this comment

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

For me, this method is simpler and easier to follow. I don't think we need that kind of optimization for this use case.

Copy link
Collaborator

@frzifus frzifus Oct 28, 2024

Choose a reason for hiding this comment

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

The main thing I see here is that the current approach is more error prune and someone needs to maintain it.
Also using exec instead of simply querying some API endpoints feels to me like bad practice.

Additonally we dont run into any issues, when the exec runs on mac or linux machines with different git versions or limitations on the executed processes.


As a starting point, all details are available in this manifest file:
https://raw.githubusercontent.com/open-telemetry/opentelemetry-collector-releases/refs/heads/main/distributions/otelcol-contrib/manifest.yaml

When iterating on the manifest details, we manly have to construct two types of domains...
Example:

Finally merge all the metadata and render it.

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 main thing I see here is that the current approach is more error prune and someone needs to maintain it.

I don't still see why this is "more error-prone". A call to the GitHub API will need to be maintained too.

Also using exec instead of simply querying some API endpoints feels to me like bad practice.

I would agree if this would be an application run in production systems where we need high availability or something like that and not just an script to get what components are supported or not as part of our release process.

Additonally we dont run into any issues, when the exec runs on mac or linux machines with different git versions or limitations on the executed processes.

It's just "git clone". You should have it configured on your machine to be able to work.

As a starting point, all details are available in this manifest file:
https://raw.githubusercontent.com/open-telemetry/opentelemetry-collector-releases/refs/heads/main/distributions/otelcol-contrib/manifest.yaml

When iterating on the manifest details, we manly have to construct two types of domains...
Example:

https://raw.githubusercontent.com/open-telemetry/opentelemetry-collector/refs/tags/exporter/debugexporter/v0.112.0/exporter/debugexporter/metadata.yaml
or
https://raw.githubusercontent.com/open-telemetry/opentelemetry-collector-contrib/refs/tags/v0.112.0/exporter/alertmanagerexporter/metadata.yaml
Finally merge all the metadata and render it.

I don't get what you want to explain with this. Please, you could you detail it more?

Signed-off-by: Israel Blancas <[email protected]>
@iblancasa iblancasa requested a review from pavolloffay October 18, 2024 17:28
@iblancasa iblancasa requested a review from frzifus October 28, 2024 11:59
@iblancasa iblancasa closed this Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants