There is an [in-progress PR](https://github.com/open-telemetry/opentelemetry-collector/pull/10495) 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: ```go func StringifyInstanceID(id component.InstanceID) string { return fmt.Sprintf("%s/%s", StringifyKind(id.Kind()), id.ComponentID()) } ```
There is an in-progress PR to make
component.InstanceIDimmutable 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 ofcomponent.InstanceIDin 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: