def METHOD_NAME(dd_agent_check, init_config, instance_ao_docker_secondary):
    aggregator = dd_agent_check({'init_config': init_config, 'instances': [instance_ao_docker_secondary]})
    for mname in (
        EXPECTED_AO_METRICS_SECONDARY
        + EXPECTED_QUERY_EXECUTOR_AO_METRICS_SECONDARY
        + EXPECTED_AO_METRICS_COMMON
        + EXPECTED_QUERY_EXECUTOR_AO_METRICS_COMMON
    ):
        aggregator.assert_metric(mname)
    for mname in EXPECTED_AO_METRICS_PRIMARY + EXPECTED_QUERY_EXECUTOR_AO_METRICS_PRIMARY:
        aggregator.assert_metric(mname, count=0)
    aggregator.assert_metrics_using_metadata(get_metadata_metrics(), exclude=CUSTOM_METRICS)