Skip to content

Breaking changes to component.InstanceID #6984

Description

@mwear

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())
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-attentionAn issue or PR has been sitting around and needs attention.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions