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

Breaking changes to component.InstanceID #6984

Open
mwear opened this issue Jul 17, 2024 · 2 comments
Open

Breaking changes to component.InstanceID #6984

mwear opened this issue Jul 17, 2024 · 2 comments
Labels
needs-attention An issue or PR has been sitting around and needs attention.

Comments

@mwear
Copy link

mwear commented Jul 17, 2024

There is an in-progress PR to make component.InstanceID immutable in collector core. It is currently a struct with all fields exported. The fields will only be accessible by getter methods going forward. Here are the occurrences of component.InstanceID in this repo: https://github.com/search?q=repo%3Agrafana%2Fagent%20component.InstanceID&type=code.

I believe the only thing that will have to change is:

func StringifyInstanceID(id component.InstanceID) string {
return fmt.Sprintf("%s/%s", StringifyKind(id.Kind), id.ID)
}

The change that will need to be made is below:

func StringifyInstanceID(id component.InstanceID) string {
	return fmt.Sprintf("%s/%s", StringifyKind(id.Kind()), id.ComponentID())
}
@ptodev
Copy link
Contributor

ptodev commented Aug 15, 2024

Hi, @mwear! Thank you for the heads up! 😊 Please feel free to merge the OTel PR when it is ready, and we will update Agent and Alloy accordingly during the next time we upgrade the OTel dependencies. I think it shouldn't be a problem.

Copy link
Contributor

This issue has not had any activity in the past 30 days, so the needs-attention label has been added to it.
If the opened issue is a bug, check to see if a newer release fixed your issue. If it is no longer relevant, please feel free to close this issue.
The needs-attention label signals to maintainers that something has fallen through the cracks. No action is needed by you; your issue will be kept open and you do not have to respond to this comment. The label will be removed the next time this job runs if there is new activity.
Thank you for your contributions!

@github-actions github-actions bot added the needs-attention An issue or PR has been sitting around and needs attention. label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-attention An issue or PR has been sitting around and needs attention.
Projects
None yet
Development

No branches or pull requests

2 participants