grafana / agent

Vendor-neutral programmable observability pipelines.
https://grafana.com/docs/agent/
Apache License 2.0
1.59k stars 490 forks source link

Breaking changes to component.InstanceID #6984

Open mwear opened 3 months ago

mwear commented 3 months ago

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:https://github.com/grafana/agent/blob/3eb7f7e314bbd3084770e8ed214ddedf3062bf66/internal/converter/internal/otelcolconvert/utils.go#L14-L16

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 commented 2 months ago

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.

github-actions[bot] commented 1 month ago

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!