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

[Donation Proposal]: Go offsets tracker #1467

Closed
mariomac opened this issue May 3, 2023 · 6 comments
Closed

[Donation Proposal]: Go offsets tracker #1467

mariomac opened this issue May 3, 2023 · 6 comments

Comments

@mariomac
Copy link

mariomac commented May 3, 2023

Description

Currently, the OpenTelemetry Go Instrumentation project contains a tool to track the offsets of struct fields across different versions of Go and third-party libraries. This tool is useful to instrument data fields of external executables when they don't bundle any type of debugging information.

We found this tool very useful for our own use cases, so we adapted it to fit better within our workflows and made it as a generic standalone application that is easily installable with go install.

We want to contribute it back to the community: https://github.com/grafana/go-offsets-tracker

If it is accepted, we will submit a Pull Request to integrate it within the OpenTelemetry Go Instrumentation project, removing their current offsets tracker code from the repository.

Benefits to the OpenTelemetry community

Separating the tool from its original OpenTelemetry Go Instrumentation repository will facilitate its shared use across different projects. Also the original repository evolution can be focused on its actual added-value rather than the tooling.

Reasons for donation

Grafana is committed with the development of OpenTelemetry. Also, a big part of the tool code is taken from OpenTelemetry, so it's fair to offer it back.

This is the first of a series of contributions that the Grafana eBPF squad plans to do in the mid term.

Repository

https://github.com/grafana/go-offsets-tracker

Existing usage

It is used by our own eBPF services' auto-instrumenter, a project that we are developing to explore the possibilities of eBPF in the Grafana ecosystem, which in principle we also plan to donate (if the community shows interest on it).

Maintenance

Grafana offers their engineers to maintain bugs, handle issues and review PRs. Anyone else from the community, external to Grafana, is welcome.

Licenses

Apache License 2.0 https://github.com/grafana/ebpf-autoinstrument/blob/main/LICENSE

Trademarks

N/A

Other notes

Some members of the OTEL Go instrumenter community that might be interested on this: @MrAlias @edeNFed @dineshg13 @MikeGoldsmith

@edeNFed
Copy link
Contributor

edeNFed commented May 3, 2023

Hi @mariomac looks like some nice additions on top of the existing offsets tracker.

I think you can just go ahead and submit a PR to the opentelemetry-go-instrumentation repo. I am not sure this change requires the whole donation process as it is improvements of existing code that is already part of OTel.

@mariomac
Copy link
Author

mariomac commented May 3, 2023

Thanks for the response @edeNFed . In this case, the change would be removing the current tracking generation&parsing code from the opentelemetry-go-instrumentation-repo, then modify the offsets update scripts to download the executable (go install github.com/grafana/go-offsets-tracker/cmd/go-offsets-tracker@latest) and point to the github.com/grafana/go-offsets-tracker library in the go.mod to use the offsets reading code.

We thought that maybe the opentelemetry-go-instrumentation maintainers would prefer changing these github.com/grafana/... references by github.com/open-telemetry/.... But we are fine with both approaches.

@MrAlias
Copy link
Contributor

MrAlias commented May 3, 2023

Thanks for the response @edeNFed . In this case, the change would be removing the current tracking generation&parsing code from the opentelemetry-go-instrumentation-repo, then modify the offsets update scripts to download the executable (go install github.com/grafana/go-offsets-tracker/cmd/go-offsets-tracker@latest) and point to the github.com/grafana/go-offsets-tracker library in the go.mod to use the offsets reading code.

We thought that maybe the opentelemetry-go-instrumentation maintainers would prefer changing these github.com/grafana/... references by github.com/open-telemetry/.... But we are fine with both approaches.

Why not just copy the contents of https://github.com/grafana/go-offsets-tracker to https://github.com/open-telemetry/opentelemetry-go-instrumentation/tree/main/offsets-tracker?

@mariomac
Copy link
Author

mariomac commented May 4, 2023

@MrAlias yeah we already did it previously. We can do it again with the newer changes, but I have the concern of having to stick the release tag of the offsets tracker to the release tag of opentelemetry-go-instrumentation. Currently we need a tag to install the executable via go install. If we find any bug or missing feature that needs to be quickly solved to unblock any of the user teams, releasing the offsets tracker would involve adding a premature tag to the instrumenter.

Anyway if you find is not worth creating a new repository for this tool, we will be happy to follow @MrAlias suggestion and copy everything in the original repository, plus keeping our own parallel repo as a safeguard in case we need to do a quick release or someone introduces a breaking change in the upstream repo (to avoid breaking our CI).

@trask
Copy link
Member

trask commented Sep 17, 2024

hi @mariomac! have you had any further discussions with the Go SIG about contributing this into one of their existing repositories? thanks

@mariomac
Copy link
Author

Hi @trask no, we haven't. Having a look to the current code, the opentelemetry-go-instrumentation project uses an offsets.json format that is different from the one that we initially contributed, so this tool has become incompatible.

I guess it's fine closing the donation proposal.

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

No branches or pull requests

4 participants