-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add unique identifier for mysql receiver #46605
Description
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.nameto receiver metadata, then set the default value with correspondingdb.system.name. Addresource_attributes_overridein receiver config, this feature is set by users to manually override any resource attribute (including auto generated resource attributes)- This is replaced by a change in
mdatagen. Suggested by @dmitryax [receiver/sqlserver] Add default service.name resource attribute #46557 (comment) This is a general feature that can work for any resource attributes (string value). And, it shouldn't assume what resource attributes will be override.
- This is replaced by a change in
- Add
override_valuefeature tomdatagento 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.