artprima / prometheus-metrics-bundle

Symfony 5/6 Prometheus Metrics Bundle
MIT License
133 stars 29 forks source link

Fix supported storage types by adding 'apcng' to allowed values #82

Closed edditor closed 1 year ago

edditor commented 1 year ago

bug of https://github.com/artprima/prometheus-metrics-bundle/commit/150b9c71ccd5ee7303444a69fd06c86a5c516064

Johnmeurt commented 1 year ago

It seems the bug you noticed is in the README

 apcung  Prometheus\Storage\APCng    

The driver name is apcng.

Your PR changes a deprecated section of the configuration. Your config file should now use the storage key:

storage:
        # Known values: in_memory, apcu, apcng, redis
        type: apcng
edditor commented 1 year ago

Hello @Johnmeurt, thanks for the quick reply. You are right, I saw it in the README and added it incorrectly to the supported types. Now I fixed it, also in the README.

Johnmeurt commented 1 year ago

You are trying to add support of an adapter in a deprecated section. Did you try to change your configuration file to

# Type key is deprecated. Remove this key and try to add the storage section
#type: apcng

# v1.14 add the section storage.
storage:
        # Known values: in_memory, apcu, apcng, redis
        type: apcng

Does this change suit you ? The validation by choice list has been removed on storage.type.

edditor commented 1 year ago

Sorry, I didn't see that the configuration keys had changed. Thank you, this works for me, so I think it no longer needs to be added to the allowed values in the deprecated config section.

Johnmeurt commented 1 year ago

You could let the PR open in case @denisvmedia wants to add support of the apcng storage on the old configuration synthax. In case not the README file should be fix.

denisvmedia commented 1 year ago

Thank you @edditor and @Johnmeurt. Merging.