diff --git a/swift/obj/server.py b/swift/obj/server.py index fc64fb9bf6..fe2b769d8b 100644 --- a/swift/obj/server.py +++ b/swift/obj/server.py @@ -1198,7 +1198,7 @@ class ObjectController(BaseStorageServer): @public @timing_stats(sample_rate=0.8) - @labeled_timing_stats(metric=LABELED_METRIC_NAME, sample_rate=0.8) + @labeled_timing_stats(metric=LABELED_METRIC_NAME) def HEAD(self, request, timing_stats_labels): """Handle HTTP HEAD requests for the Swift Object Server.""" device, partition, account, container, obj, policy = \ @@ -1357,7 +1357,7 @@ class ObjectController(BaseStorageServer): @public @replication @timing_stats(sample_rate=0.1) - @labeled_timing_stats(metric=LABELED_METRIC_NAME, sample_rate=0.1) + @labeled_timing_stats(metric=LABELED_METRIC_NAME) def REPLICATE(self, request, timing_stats_labels): """ Handle REPLICATE requests for the Swift Object Server. This is used @@ -1388,7 +1388,7 @@ class ObjectController(BaseStorageServer): @public @replication @timing_stats(sample_rate=0.1) - @labeled_timing_stats(metric=LABELED_METRIC_NAME, sample_rate=0.1) + @labeled_timing_stats(metric=LABELED_METRIC_NAME) def SSYNC(self, request, timing_stats_labels): # the ssync sender may want to send PUT subrequests for non-durable # data that should not be committed; legacy behaviour has been to diff --git a/test/unit/obj/test_server.py b/test/unit/obj/test_server.py index 666b5a0006..2dee1d0f46 100644 --- a/test/unit/obj/test_server.py +++ b/test/unit/obj/test_server.py @@ -356,8 +356,7 @@ class TestObjectController(BaseTestCase): 'container': 'c', 'policy': 0, 'status': 200 - }, - 'sample_rate': 0.8 + } })] }, statsd.calls) @@ -412,8 +411,7 @@ class TestObjectController(BaseTestCase): 'policy': 0, 'skip_rehash': False, 'status': 200 - }, - 'sample_rate': 0.1 + } })]}, statsd.calls) @@ -434,8 +432,7 @@ class TestObjectController(BaseTestCase): 'policy': 0, 'skip_rehash': True, 'status': 200 - }, - 'sample_rate': 0.1 + } })]}, statsd.calls) @@ -458,8 +455,7 @@ class TestObjectController(BaseTestCase): 'policy': 1, 'skip_rehash': False, 'status': 200 - }, - 'sample_rate': 0.1 + } })]}, statsd.calls) @@ -479,8 +475,7 @@ class TestObjectController(BaseTestCase): 'method': 'SSYNC', 'policy': 0, 'status': 200 - }, - 'sample_rate': 0.1 + } })] }, statsd.calls) @@ -500,8 +495,7 @@ class TestObjectController(BaseTestCase): 'policy': 0, 'status': 507, **additional_labels - }, - **kwargs + } })] }, statsd.calls) @@ -587,8 +581,7 @@ class TestObjectController(BaseTestCase): 'labels': { 'method': req.method, 'status': 507, - }, - **kwargs + } })] }, statsd.calls) @@ -606,8 +599,7 @@ class TestObjectController(BaseTestCase): 'labels': { 'method': req.method, 'status': 503, - }, - **kwargs + } })] }, statsd.calls)