Incorrect variable type passed to request.core.get_next counter
Motivation
----------

https://github.com/rucio/rucio/blob/63823eceebe68294c98364884a33172d14591da9/lib/rucio/core/request.py#L313

results in this error on the statsd side: 
```
19 Nov 16:32:19 - DEBUG: Bad line:  'T'>, <RequestType.STAGEIN in msg "rucio_int_okd.core.request.get_next.[<RequestType.TRANSFER: 'T'>, <RequestType.STAGEIN: 'I'>, <RequestType.STAGEOUT: 'O'>].[<RequestState.DONE: 'D'>, <RequestState.FAILED: 'F'>, <RequestState.LOST: 'L'>, <RequestState.SUBMITTING: 'G'>, <RequestState.SUBMISSION_FAILED: 'A'>, <RequestState.NO_SOURCES: 'N'>, <RequestState.ONLY_TAPE_SOURCES: 'O'>, <RequestState.MISMATCH_SCHEME: 'M'>]:1|c"
```

The issue is probably there since the "enum" refactoring. 

Modification
------------

Request_type must be explicitly converted to a string when passing to record_counter.

diff --git a/lib/rucio/core/request.py b/lib/rucio/core/request.py
index 50d3dec46..16dfa29c7 100644
--- a/lib/rucio/core/request.py
+++ b/lib/rucio/core/request.py
@@ -309,8 +309,10 @@ def get_next(request_type, state, limit=100, older_than=None, rse_id=None, activ
     :param session:           Database session to use.
     :returns:                 Request as a dictionary.
     """
-
-    record_counter('core.request.get_next.{request_type}.{state}', labels={'request_type': request_type, 'state': state})
+    request_type_metric_label = '.'.join(a.name for a in request_type) if isinstance(request_type, list) else request_type.name
+    state_metric_label = '.'.join(s.name for s in state) if isinstance(state, list) else state.name
+    record_counter('core.request.get_next.{request_type}.{state}', labels={'request_type': request_type_metric_label,
+                                                                           'state': state_metric_label})
 
     # lists of one element are not allowed by SQLA, so just duplicate the item
     if type(request_type) is not list:
diff --git a/lib/rucio/tests/test_conveyor.py b/lib/rucio/tests/test_conveyor.py
index d33d72089..2cc697524 100644
--- a/lib/rucio/tests/test_conveyor.py
+++ b/lib/rucio/tests/test_conveyor.py
@@ -384,6 +384,12 @@ def test_multisource(vo, did_factory, root_account, replica_client, core_config_
     # Only one request was handled; doesn't matter that it's multisource
     assert metrics_mock.get_sample_value('rucio_daemons_conveyor_finisher_handle_requests_total') >= 1
     assert metrics_mock.get_sample_value('rucio_daemons_conveyor_poller_update_request_state_total', labels={'updated': 'True'}) >= 1
+    assert metrics_mock.get_sample_value(
+        'rucio_core_request_get_next_total',
+        labels={
+            'request_type': 'TRANSFER.STAGEIN.STAGEOUT',
+            'state': 'DONE.FAILED.LOST.SUBMITTING.SUBMISSION_FAILED.NO_SOURCES.ONLY_TAPE_SOURCES.MISMATCH_SCHEME'}
+    )
 
 
 @skip_rse_tests_with_accounts
['lib/rucio/core/request.py', 'lib/rucio/tests/test_conveyor.py']