@Override
    public Map<String, String> getAllVariables() {
        Map<String, String> allVariables =
                parentMetricGroup.getAllVariables(
                        this.settings.getReporterIndex(), this.settings.getExcludedVariables());

        if (!this.settings.getAdditionalVariables().isEmpty()) {
            allVariables = new CompositeMap(allVariables, this.settings.getAdditionalVariables());
        }

        return Collections.unmodifiableMap(allVariables);
    }
@Test
    void testGetAllVariablesWithAdditionalVariables() {
        final FrontMetricGroup<?> frontMetricGroup =
                new FrontMetricGroup<>(
                        new ReporterScopedSettings(
                                0,
                                '.',
                                MetricFilter.NO_OP_FILTER,
                                Collections.emptySet(),
                                ImmutableMap.of(ScopeFormat.asVariable("foo"), "bar")),
                        new ProcessMetricGroup(TestingMetricRegistry.builder().build(), "host"));

        assertThat(frontMetricGroup.getAllVariables())
                .containsEntry(ScopeFormat.asVariable("foo"), "bar");
    }