Skip to content

Add unique identifier for mysql receiver #46605

@XSAM

Description

@XSAM

Component(s)

receiver/mysql

Is your feature request related to a problem? Please describe.

Currently, mysql receiver does not populate resource attributes service.instance.id, service.name and service.namespace. We should provide a way to populate these attributes so users can identify database instances.

Describe the solution you'd like

We need three changes:

  • Automatic add service.instance.id: the value is <server.address>:<server.port>. Just like sqlserver receiver.
  • Add service.name to receiver metadata, then set the default value with corresponding db.system.name.
  • Add resource_attributes_override in receiver config, this feature is set by users to manually override any resource attribute (including auto generated resource attributes)
  • Add override_value feature to mdatagen to allow users to override the default value.

service.namespace can be added later once requested by the community, since I am not sure the use case here for database instances, yet.

Describe alternatives you've considered

No response

Additional context

I don't know we should auto generate service.name, as the default value unknown_service does not provide much of value here. @lmolkova

We can do auto generating service.name in the following change once we are confident, though.

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions